Browse code

improve test code

Nat! authored on 22-08-2017 19:12:48
Showing 3 changed files
... ...
@@ -1,4 +1,4 @@
1
-#! /bin/sh -x
1
+#! /usr/bin/env bash 
2 2
 
3 3
 clear_test_dirs()
4 4
 {
... ...
@@ -44,20 +44,20 @@ setup_test_case()
44 44
    mkdir -p b
45 45
 
46 46
    (
47
-      cd b ;
48
-      git init ;
49
-      echo "b) VfL Bochum 1848" > README.md ;
50
-      git add README.md ;
47
+      cd b &&
48
+      git init &&
49
+      echo "b) VfL Bochum 1848" > README.md &&
50
+      git add README.md && 
51 51
       git commit -m "bla bla"
52 52
    ) || exit 1
53 53
 
54 54
    mkdir -p c
55 55
 
56 56
    (
57
-      cd c ;
58
-      git init ;
59
-      echo "c) VfL Bochum 1848" > README.md ;
60
-      git add README.md ;
57
+      cd c && 
58
+      git init && 
59
+      echo "c) VfL Bochum 1848" > README.md &&
60
+      git add README.md && 
61 61
       git commit -m "bla bla"
62 62
    ) || exit 1
63 63
 
... ...
@@ -102,9 +102,8 @@ echo "mulle-bootstrap: `mulle-bootstrap version`(`mulle-bootstrap library-path`)
102 102
 MULLE_BOOTSTRAP_CACHES_PATH="`pwd -P`"
103 103
 export MULLE_BOOTSTRAP_CACHES_PATH
104 104
 
105
-setup_test_case
106
-test_a "$@"
105
+setup_test_case &&
106
+test_a "$@" &&
107
+echo "succeeded" >&2 &&
107 108
 clear_test_dirs a b
108 109
 
109
-echo "succeeded" >&2
110
-
... ...
@@ -173,9 +173,9 @@ echo "mulle-bootstrap: `mulle-bootstrap version`(`mulle-bootstrap library-path`)
173 173
 MULLE_BOOTSTRAP_CACHES_PATH="`pwd -P`"
174 174
 export MULLE_BOOTSTRAP_CACHES_PATH
175 175
 
176
-setup_test_case
177
-test_a "$@"
176
+setup_test_case &&
177
+test_a "$@" &&
178
+echo "succeeded" >&2 &&
178 179
 clear_test_dirs a b
179 180
 
180
-echo "succeeded" >&2
181 181