diff options
author | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2018-01-15 18:03:05 +0100 |
---|---|---|
committer | Michał Łyszczek <michal.lyszczek@bofc.pl> | 2018-01-15 18:03:05 +0100 |
commit | ad9a03a4f786d6ff413b305780221f892a9e19ec (patch) | |
tree | 806ae75c4314a8026a0679f020d126b4760b824f | |
parent | 0f604c8da38444fa584bf95be6c0230784b0c953 (diff) | |
download | mtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.tar.gz mtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.tar.bz2 mtest-ad9a03a4f786d6ff413b305780221f892a9e19ec.zip |
added mt_test_named to shell mtestv1.1.0
-rwxr-xr-x | mtest.sh | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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)) |