Skip to content
Browse files

Improve test formatting

  • Loading branch information...
1 parent ed0c092 commit 7362eb100a63af4e5758b2e36c414c24db822a27 Rein Henrichs committed Sep 9, 2011
Showing with 27 additions and 7 deletions.
  1. +4 −1 test/test_failing.sh
  2. +14 −4 test/test_output.sh
  3. +4 −1 test/test_passing.sh
  4. +5 −1 test/test_pending.sh
View
5 test/test_failing.sh
@@ -1,4 +1,7 @@
. lib/test_helper.sh
-( bin/batunit "test/fixtures/test_fail.sh" &>/dev/null ) && flunk "TEST"
+( bin/batunit "test/fixtures/test_fail.sh" &>/dev/null ) &&
+ flunk "should exit !0 but was $?"
exit 0
+
+# vim: sw=4:ts=4:sts=4
View
18 test/test_output.sh
@@ -1,8 +1,18 @@
. lib/test_helper.sh
# Summary output
-( bin/batunit test/fixtures/test_pass.sh | grep -q 'Finished: 1 tests, 0 failures, 0 pending' &>/dev/null ) || flunk "Test summary should be correct"
-( bin/batunit test/fixtures/test_fail.sh | grep -q 'Finished: 1 tests, 1 failures, 0 pending' &>/dev/null ) || flunk "Test summary should be correct"
-( bin/batunit test/fixtures/test_pending.sh | grep -q 'Finished: 1 tests, 0 failures, 1 pending' &>/dev/null ) || flunk "Test summary should be correct"
-( bin/batunit test/fixtures/*.sh | grep -q 'Finished: 3 tests, 1 failures, 1 pending' &>/dev/null ) || flunk "Test summary should be correct"
+( bin/batunit test/fixtures/test_pass.sh | grep -q 'Finished: 1 tests, 0 failures, 0 pending' &>/dev/null ) ||
+ flunk "Test summary should be correct"
+
+( bin/batunit test/fixtures/test_fail.sh | grep -q 'Finished: 1 tests, 1 failures, 0 pending' &>/dev/null ) ||
+ flunk "Test summary should be correct"
+
+( bin/batunit test/fixtures/test_pending.sh | grep -q 'Finished: 1 tests, 0 failures, 1 pending' &>/dev/null ) ||
+ flunk "Test summary should be correct"
+
+( bin/batunit test/fixtures/*.sh | grep -q 'Finished: 3 tests, 1 failures, 1 pending' &>/dev/null ) ||
+ flunk "Test summary should be correct"
+
exit 0
+
+# vim: sw=4:ts=4:sts=4
View
5 test/test_passing.sh
@@ -1,4 +1,7 @@
. lib/test_helper.sh
-( bin/batunit "test/fixtures/test_pass.sh" &>/dev/null ) || flunk "test_pass.sh should exit 0 but was $?"
+( bin/batunit "test/fixtures/test_pass.sh" &>/dev/null ) ||
+ flunk "should exit 0 but was $?"
exit 0
+
+# vim: sw=4:ts=4:sts=4
View
6 test/test_pending.sh
@@ -1,5 +1,9 @@
. lib/test_helper.sh
# pending
-( bin/batunit "test/fixtures/test_pending.sh" 2>&1 | grep -q '1 pending' ) || flunk "test_pending.sh should be pending"
+( bin/batunit "test/fixtures/test_pending.sh" 2>&1 | grep -q '1 pending' ) ||
+ flunk "test_pending.sh should be pending"
+
exit 0
+
+# vim: sw=4:ts=4:sts=4

0 comments on commit 7362eb1

Please sign in to comment.
Something went wrong with that request. Please try again.