This repository was archived by the owner on Aug 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1+
2+ a-bad-filename.md
3+ 1:1 warning Do not start file names with ` a ` no-file-name-articles remark-lint
4+
5+ ⚠ 1 warning
Original file line number Diff line number Diff line change @@ -12,12 +12,25 @@ LINT_MD="$TEST_DIR/../bin/lint-md"
1212# Re-generate `.expected` files with current configuration.
1313# "$LINT_MD" "$TEST_DIR/good.md" --no-color > "$TEST_DIR/good.expected.md" 2>&1
1414# "$LINT_MD" "$TEST_DIR/bad.md" --no-color > "$TEST_DIR/bad.expected.md" 2>&1
15+ # "$LINT_MD" "$TEST_DIR/a-bad-filename.md" --no-color > "$TEST_DIR/a-bad-filename.expected.md" 2>&1
1516
1617# Compare remark output with expected output. Fail on diff.
18+ echo " Testing good.md ..."
1719diff <( " $LINT_MD " " $TEST_DIR /good.md" --no-color 2>&1 ) " $TEST_DIR /good.expected.md"
1820EXIT_GOOD=$?
21+
22+ echo " Testing bad.md ..."
1923diff <( " $LINT_MD " " $TEST_DIR /bad.md" --no-color 2>&1 ) " $TEST_DIR /bad.expected.md"
2024EXIT_BAD=$?
2125
22- # Fail if either diff failed
23- exit $EXIT_GOOD || $EXIT_BAD
26+ echo " Testing a-bad-filename.expected.md ..."
27+ diff <( " $LINT_MD " " $TEST_DIR /a-bad-filename.md" --no-color 2>&1 ) " $TEST_DIR /a-bad-filename.expected.md"
28+ EXIT_BAD_FILENAME=$?
29+
30+ # Fail if either diff failed.
31+ # This if will fall apart quickly as we add more test cases.
32+ # Need to consider some type of looping, etc possibly.
33+ if [ " $EXIT_GOOD " -ne " 0" ] || [ " $EXIT_BAD " -ne " 0" ] || [ " $EXIT_BAD_FILENAME " -ne " 0" ]; then
34+ echo " One or more tests failed!"
35+ exit 1
36+ fi
You can’t perform that action at this time.
0 commit comments