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 5605aab commit 0b427afCopy full SHA for 0b427af
test/README.md
@@ -0,0 +1,37 @@
1
+--
2
+### Writing tests
3
+
4
+See also the [Bash style guide](../README.md)
5
6
7
+##### all tests should use `set -e` and call `setup` before making any assertions
8
9
+Like this:
10
11
+```bash
12
+begin_test "echo works"
13
+(
14
+ set -e
15
+ setup
16
17
+ echo passing | grep passing
18
+)
19
+end_test
20
+```
21
22
23
+##### Resist the urge to disable `set -e`
24
25
+If you want to assert failure, please resist the urge to disable `set -e` and
26
+instead use negation with `!`:
27
28
29
+begin_test "netcat is not from bsd"
30
31
32
33
34
+ ! nc -h 2>&1 | grep bsd
35
36
37
0 commit comments