Skip to content

Commit 027bf0b

Browse files
committed
fix: update test assertions to match renamed comment terminology
The PR renamed CMT-specific terminology to generic "comment" terminology in both refine-plan.md and validate-refine-plan-io.sh, but the test assertions in test-refine-plan.sh still referenced the old text. Update all 9 affected assertions to match the current documentation and error messages.
1 parent 690fb27 commit 027bf0b

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

tests/test-refine-plan.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -706,26 +706,26 @@ assert_file_contains "$REFINE_PLAN_CMD" 'Keep `--alt-language` out of the valida
706706
assert_file_contains "$REFINE_PLAN_CMD" "- Exit code 0: Continue to Phase 2" "refine-plan.md documents validator exit code 0"
707707
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 1: Report `Input file not found` and stop' "refine-plan.md documents validator exit code 1"
708708
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 2: Report `Input file is empty` and stop' "refine-plan.md documents validator exit code 2"
709-
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 3: Report `Input file has no CMT:/ENDCMT blocks` and stop' "refine-plan.md documents validator exit code 3"
709+
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 3: Report `Input file has no comment blocks` and stop' "refine-plan.md documents validator exit code 3"
710710
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 4: Report `Input file is missing required gen-plan sections` and stop' "refine-plan.md documents validator exit code 4"
711711
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 5: Report `Output directory does not exist or is not writable - please fix it` and stop' "refine-plan.md documents validator exit code 5"
712712
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 6: Report `QA directory is not writable` and stop' "refine-plan.md documents validator exit code 6"
713713
assert_file_contains "$REFINE_PLAN_CMD" '- Exit code 7: Report `Invalid arguments` and show the validator usage, then stop' "refine-plan.md documents validator exit code 7"
714714

715715
echo ""
716716
echo "PT-5: Comment extraction requirements"
717-
assert_file_contains "$REFINE_PLAN_CMD" "Support both inline and multi-line blocks:" "refine-plan.md supports inline and multiline comment extraction"
717+
assert_file_contains "$REFINE_PLAN_CMD" "Support both inline and multi-line blocks for all formats:" "refine-plan.md supports inline and multiline comment extraction"
718718
assert_file_contains "$REFINE_PLAN_CMD" 'Inline: `Text before CMT: comment text ENDCMT text after`' "refine-plan.md documents single-line comment extraction"
719719
assert_file_contains "$REFINE_PLAN_CMD" "CMT:" "refine-plan.md includes multiline comment marker example"
720-
assert_file_contains "$REFINE_PLAN_CMD" 'Ignore `CMT:` and `ENDCMT` sequences inside fenced code blocks.' "refine-plan.md documents code fence exclusion"
721-
assert_file_contains "$REFINE_PLAN_CMD" 'Ignore `CMT:` and `ENDCMT` sequences inside HTML comments.' "refine-plan.md documents HTML comment exclusion"
720+
assert_file_contains "$REFINE_PLAN_CMD" 'Ignore comment markers inside fenced code blocks.' "refine-plan.md documents code fence exclusion"
721+
assert_file_contains "$REFINE_PLAN_CMD" 'Ignore comment markers inside HTML comments.' "refine-plan.md documents HTML comment exclusion"
722722
assert_file_contains "$REFINE_PLAN_CMD" "Preserve surrounding non-comment text when removing inline comment blocks from the working plan text." "refine-plan.md preserves inline surrounding text"
723723
assert_file_contains "$REFINE_PLAN_CMD" '- `nearest_heading` or `Preamble` when no heading exists yet' "refine-plan.md records nearest heading or Preamble"
724724
assert_file_contains "$REFINE_PLAN_CMD" '- `location_label` for QA output' "refine-plan.md records location labels"
725725
assert_file_contains "$REFINE_PLAN_CMD" '- `form` = `inline` or `multiline`' "refine-plan.md records comment form"
726726
assert_file_contains "$REFINE_PLAN_CMD" '- `context_excerpt` from the nearest non-comment source text' "refine-plan.md records context excerpts"
727-
assert_file_contains "$REFINE_PLAN_CMD" 'Nested `CMT:` while already inside a comment block' "refine-plan.md documents nested CMT parse errors"
728-
assert_file_contains "$REFINE_PLAN_CMD" '`ENDCMT` encountered while not inside a comment block' "refine-plan.md documents stray ENDCMT parse errors"
727+
assert_file_contains "$REFINE_PLAN_CMD" 'Nested comment start marker while already inside a comment block' "refine-plan.md documents nested CMT parse errors"
728+
assert_file_contains "$REFINE_PLAN_CMD" 'Comment end marker encountered while not inside a comment block or wrong end marker for the format' "refine-plan.md documents stray ENDCMT parse errors"
729729
assert_file_contains "$REFINE_PLAN_CMD" "End of file reached while still inside a comment block" "refine-plan.md documents missing ENDCMT parse errors"
730730
assert_file_contains "$REFINE_PLAN_CMD" "No non-empty CMT blocks remain after parsing" "refine-plan.md rejects empty-only comment sets"
731731

@@ -1161,10 +1161,10 @@ else
11611161
fail "validate-refine-plan-io: unterminated CMT blocks exit 3" "3" "$VALIDATOR_EXIT_CODE"
11621162
fi
11631163

1164-
if echo "$VALIDATOR_OUTPUT" | grep -q "missing ENDCMT"; then
1164+
if echo "$VALIDATOR_OUTPUT" | grep -q "missing end marker"; then
11651165
pass "validate-refine-plan-io: unterminated CMT blocks report missing ENDCMT"
11661166
else
1167-
fail "validate-refine-plan-io: unterminated CMT blocks report missing ENDCMT" "missing ENDCMT" "$VALIDATOR_OUTPUT"
1167+
fail "validate-refine-plan-io: unterminated CMT blocks report missing ENDCMT" "missing end marker" "$VALIDATOR_OUTPUT"
11681168
fi
11691169

11701170
if echo "$VALIDATOR_OUTPUT" | grep -q 'context: "CMT: this block never closes"'; then
@@ -1182,10 +1182,10 @@ else
11821182
fail "validate-refine-plan-io: nested CMT blocks exit 3" "3" "$VALIDATOR_EXIT_CODE"
11831183
fi
11841184

1185-
if echo "$VALIDATOR_OUTPUT" | grep -q "nested CMT block"; then
1185+
if echo "$VALIDATOR_OUTPUT" | grep -q "nested comment block"; then
11861186
pass "validate-refine-plan-io: nested CMT blocks report a parse error"
11871187
else
1188-
fail "validate-refine-plan-io: nested CMT blocks report a parse error" "nested CMT block" "$VALIDATOR_OUTPUT"
1188+
fail "validate-refine-plan-io: nested CMT blocks report a parse error" "nested comment block" "$VALIDATOR_OUTPUT"
11891189
fi
11901190

11911191
MISSING_SECTION_PLAN="$TEST_FIXTURES_DIR/missing-sections-plan.md"
@@ -1314,10 +1314,10 @@ else
13141314
fail "validate-refine-plan-io: mixed valid, ignored, and empty markers still pass with a valid block" "0" "$VALIDATOR_EXIT_CODE"
13151315
fi
13161316

1317-
if echo "$VALIDATOR_OUTPUT" | grep -Eq 'Input file: .+ \([0-9]+ lines, 1 CMT blocks\)'; then
1317+
if echo "$VALIDATOR_OUTPUT" | grep -Eq 'Input file: .+ \([0-9]+ lines, 1 comment blocks\)'; then
13181318
pass "validate-refine-plan-io: success output reports only valid non-empty CMT blocks"
13191319
else
1320-
fail "validate-refine-plan-io: success output reports only valid non-empty CMT blocks" "1 CMT blocks" "$VALIDATOR_OUTPUT"
1320+
fail "validate-refine-plan-io: success output reports only valid non-empty CMT blocks" "1 comment blocks" "$VALIDATOR_OUTPUT"
13211321
fi
13221322

13231323
NEW_FILE_DIR="$TEST_FIXTURES_DIR/new-file-output"

0 commit comments

Comments
 (0)