aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKate Ward <kate.ward@forestent.com>2020-04-11 13:39:12 +0200
committerKate Ward <kate.ward@forestent.com>2020-04-11 13:39:12 +0200
commit11da4af85ca0445d9d95a1e7cbd39655f8ea014f (patch)
treebbcc6b45d3fe70a8a92f7cb0f13c3d93f2ecd323
parentcdbcd51b7959ae9ea630e387d218846320c0fd0c (diff)
parent1da6c324c05ce5de086ef7016730c02ae766a9d0 (diff)
downloadshflags-11da4af85ca0445d9d95a1e7cbd39655f8ea014f.tar.gz
Merge branch 'master' of github.com:kward/shflags
-rw-r--r--shflags_test_helpers4
-rwxr-xr-xtest_runner18
2 files changed, 17 insertions, 5 deletions
diff --git a/shflags_test_helpers b/shflags_test_helpers
index 77dbf28..36f651f 100644
--- a/shflags_test_helpers
+++ b/shflags_test_helpers
@@ -34,10 +34,6 @@ th_warn() { echo "test:WARN $*" >&2; }
th_error() { echo "test:ERROR $*" >&2; }
th_fatal() { echo "test:FATAL $*" >&2; exit 1; }
-# My name.
-TH_MY_NAME=`basename "$0"` || th_fatal 'Error executing basename.'
-export TH_MY_NAME
-
# Path to shFlags library. Can be overridden by setting SHFLAGS_INC.
TH_SHFLAGS=${SHFLAGS_INC:-./shflags}; export TH_SHFLAGS
diff --git a/test_runner b/test_runner
index 93ca521..22aed9e 100755
--- a/test_runner
+++ b/test_runner
@@ -12,6 +12,20 @@
# This script runs all the unit tests that can be found, and generates a nice
# report of the tests.
#
+### Sample usage:
+#
+# Run all tests for all shells.
+# $ ./test_runner
+#
+# Run all tests for single shell.
+# $ ./test_runner -s /bin/bash
+#
+# Run single test for all shells.
+# $ ./test_runner -t shunit_asserts_test.sh
+#
+# Run single test for single shell.
+# $ ./test_runner -s /bin/bash -t shunit_asserts_test.sh
+#
### ShellCheck (http://www.shellcheck.net/)
# Disable source following.
# shellcheck disable=SC1090,SC1091
@@ -172,4 +186,6 @@ EOF
}
# Execute main() if this is run in standalone mode (i.e. not from a unit test).
-if [ -z "${SHUNIT_VERSION}" ]; then main "$@"; fi
+if [ -z "${SHUNIT_VERSION}" ]; then
+ main "$@"
+fi