summaryrefslogtreecommitdiff
path: root/shell/share
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2006-04-15 00:53:37 +1000
committerRobert Collins <robertc@robertcollins.net>2006-04-15 00:53:37 +1000
commit06cee63c1b85757faae6a3676e66edbac0624aed (patch)
tree37e241cf5ab588aa27b91e800b2fe00e8b5d88a8 /shell/share
parent3bebe681fc9c80ced4cfdda1b8624dd64074e83a (diff)
downloadsubunit-git-06cee63c1b85757faae6a3676e66edbac0624aed.tar.gz
Basic shell subunit bindings working.
Diffstat (limited to 'shell/share')
-rw-r--r--shell/share/subunit.sh30
1 files changed, 29 insertions, 1 deletions
diff --git a/shell/share/subunit.sh b/shell/share/subunit.sh
index 0234737..89747c8 100644
--- a/shell/share/subunit.sh
+++ b/shell/share/subunit.sh
@@ -18,6 +18,34 @@
#
function subunit_start_test () {
- # emit the current protocol start-marker for test test_name
+ # emit the current protocol start-marker for test $1
echo "test: $1"
}
+
+
+function subunit_pass_test () {
+ # emit the current protocol test passed marker for test $1
+ echo "success: $1"
+}
+
+
+function subunit_fail_test () {
+ # emit the current protocol fail-marker for test $1, and emit stdin as
+ # the error text.
+ # we use stdin because the failure message can be arbitrarily long, and this
+ # makes it convenient to write in scripts (using <<END syntax.
+ echo "failure: $1 ["
+ cat -
+ echo "]"
+}
+
+
+function subunit_error_test () {
+ # emit the current protocol error-marker for test $1, and emit stdin as
+ # the error text.
+ # we use stdin because the failure message can be arbitrarily long, and this
+ # makes it convenient to write in scripts (using <<END syntax.
+ echo "error: $1 ["
+ cat -
+ echo "]"
+}