summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2009-09-06 21:57:54 +1000
committerRobert Collins <robertc@robertcollins.net>2009-09-06 21:57:54 +1000
commit6cd35ff38227b7564a843c9a12caa35eda9ea8b8 (patch)
treec2f324540b8f870089bfb2b3113f5534ac012f75 /shell
parent6d4b439267d1449356537128abffa0d5a228402f (diff)
downloadsubunit-git-6cd35ff38227b7564a843c9a12caa35eda9ea8b8.tar.gz
Add shell skip test support.
Diffstat (limited to 'shell')
-rw-r--r--shell/share/subunit.sh8
-rwxr-xr-xshell/tests/test_source_library.sh15
2 files changed, 23 insertions, 0 deletions
diff --git a/shell/share/subunit.sh b/shell/share/subunit.sh
index e573572..f63657a 100644
--- a/shell/share/subunit.sh
+++ b/shell/share/subunit.sh
@@ -49,3 +49,11 @@ subunit_error_test () {
cat -
echo "]"
}
+
+
+subunit_skip_test () {
+ # emit the current protocol test skipped marker for test $1
+ echo "skip: $1"
+}
+
+
diff --git a/shell/tests/test_source_library.sh b/shell/tests/test_source_library.sh
index 81eef83..be0cb18 100755
--- a/shell/tests/test_source_library.sh
+++ b/shell/tests/test_source_library.sh
@@ -94,3 +94,18 @@ else
echo "output: $found_type"
echo ']' ;
fi
+
+# we should have a skip_test function
+echo 'test: subunit_skip_test exists'
+found_type=$(type -t subunit_skip_test)
+status=$?
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+ echo 'success: subunit_skip_test exists'
+else
+ echo 'failure: subunit_skip_test exists ['
+ echo 'subunit_skip_test is not a function:'
+ echo "type -t status: $status"
+ echo "output: $found_type"
+ echo ']' ;
+fi
+