aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2018-01-15 18:03:05 +0100
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2018-01-15 18:03:05 +0100
commitad9a03a4f786d6ff413b305780221f892a9e19ec (patch)
tree806ae75c4314a8026a0679f020d126b4760b824f
parent0f604c8da38444fa584bf95be6c0230784b0c953 (diff)
downloadmtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.tar.gz
mtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.tar.bz2
mtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.zip
added mt_test_named to shell mtestv1.1.0
-rwxr-xr-xmtest.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/mtest.sh b/mtest.sh
index d544bdb..de85f24 100755
--- a/mtest.sh
+++ b/mtest.sh
@@ -70,7 +70,21 @@ mt_current_test="none"
mt_run()
{
- mt_current_test="$1"
+ mt_run_named $1 $1
+}
+
+
+## ==========================================================================
+# run specified test with custom name to be printed during report
+#
+# $1 - function name as a string - will be passed to eval
+# $2 - test name, will be used instead of $1 in report
+## ==========================================================================
+
+
+mt_run_named()
+{
+ mt_current_test="$2"
mt_test_status=0
mt_total_tests=$((mt_total_tests + 1))