Skip to content

Commit d80f67a

Browse files
committed
Plan 61: add bad fixtures for out-of-order, wrong-level, extra-section
Integration fixtures pin the exact diagnostic strings and line numbers for the three new/changed behaviours: - bad/out-of-order.md — doc lists ## Tasks before ## Goal; schema lists ## Goal before ## Tasks; expects a single "section \"## Tasks\" out of order: expected after \"## Goal\"". - bad/wrong-level.md — ### Goal under schema ## Goal; expects "heading level mismatch for \"Goal\": expected h2, got h3". - bad/extra-section.md — ## Extra sits between required ## Goal and ## Tasks; expects "unexpected section \"## Extra\" (expected \"## Goal\")".
1 parent 0070c88 commit d80f67a

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
settings:
3+
schema: "../../internal/rules/MDS020-required-structure/bad/data/tmpl.md"
4+
diagnostics:
5+
- line: 3
6+
column: 1
7+
message: 'unexpected section "## Extra" (expected "## Goal")'
8+
---
9+
# My Plan
10+
11+
## Extra
12+
13+
Extra description.
14+
15+
## Goal
16+
17+
Goal description.
18+
19+
## Tasks
20+
21+
Tasks description.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
settings:
3+
schema: "../../internal/rules/MDS020-required-structure/bad/data/tmpl.md"
4+
diagnostics:
5+
- line: 3
6+
column: 1
7+
message: 'section "## Tasks" out of order: expected after "## Goal"'
8+
---
9+
# My Plan
10+
11+
## Tasks
12+
13+
Tasks description.
14+
15+
## Goal
16+
17+
Goal description.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
settings:
3+
schema: "../../internal/rules/MDS020-required-structure/bad/data/tmpl.md"
4+
diagnostics:
5+
- line: 3
6+
column: 1
7+
message: 'heading level mismatch for "Goal": expected h2, got h3'
8+
---
9+
# My Plan
10+
11+
### Goal
12+
13+
Goal description.
14+
15+
## Tasks
16+
17+
Tasks description.

0 commit comments

Comments
 (0)