Browse Source

Update 'advanced' test to contain pass-able code

Alois Mahdal 6 years ago
parent
commit
0b32a1e4de
1 changed files with 19 additions and 5 deletions
  1. 19
    5
      src/bar/baz-advanced/test

+ 19
- 5
src/bar/baz-advanced/test View File

@@ -1,8 +1,22 @@
1 1
 #!/bin/bash
2 2
 
3
-jat__pstartt "jattool sessid"
4
-    jat__cmd -h "sessid subcommand returns zero" \
5
-        jat sessid
6
-    jat__cmd -h "sessid subcommand prints something" \
7
-        test -n "$(jattool sessid)"
3
+jattool() {
4
+    #
5
+    # Run jattool safely
6
+    #
7
+    (
8
+        export PRETTY=plain
9
+        command jattool "$@"
10
+    )
11
+}
12
+
13
+jat__pstartt "jattool"
14
+    jat__cmd -h "returns two" \
15
+        -S 2 -e jattool.err -o jattool.out \
16
+        jattool
17
+    jat__cmd -h "prints nothing to stdout" \
18
+        -S 1 \
19
+        test -s jattool.out
20
+    jat__cmd -h "prints something to stderr" \
21
+        test -s jattool.err
8 22
 jat__pend