We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebbaef9 commit 78cb2c3Copy full SHA for 78cb2c3
1 file changed
docs/test-files.md
@@ -129,3 +129,23 @@ function tear_down_after_script() {
129
}
130
```
131
:::
132
+
133
+## Syntax errors in test files
134
135
+If a test file contains a Bash syntax error, **bashunit** records a failing
136
+test for that file instead of silently skipping the remaining tests. The exact
137
+error message from Bash (including file path and line number) is shown in the
138
+summary, and the suite exits with a non-zero status.
139
140
+```
141
+Running tests/example_test.sh
142
+✗ Error: Source
143
+ tests/example_test.sh: line 10: syntax error near unexpected token `fi'
144
+ tests/example_test.sh: line 10: ` fi'
145
146
+Tests: 1 failed, 1 total
147
+Some tests failed
148
149
150
+This guarantees a broken test file always fails the suite — it never passes
151
+by absence.
0 commit comments