Instead of documenting test cases with a comment, this allows them to
be documented via an argument to a function that is printed when the
test case is run. This makes it easier locate test case failures when
commands used by test cases look similar,
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
return 1
}
+test_case_string=""
+test_case()
+{
+ test_case_string="$*"
+}
+
test_header_default()
{
echo "=================================================="
- echo "Running \"$*\""
+ if [ -n "$test_case_string" ]; then
+ echo "Summary: ${test_case_string}"
+ test_case_string=""
+ fi
+ echo "Running: $*"
}
reset_test_header()