assert.sh icon indicating copy to clipboard operation
assert.sh copied to clipboard

Can the test number be available as a variable?

Open bexelbie opened this issue 10 years ago • 2 comments

This way I could have info messages like:

echo "$TEST_NUMBER: testing foo" assert something something

echo "$TEST_NUMBER: testing bar" assert something something

bexelbie avatar Jun 25 '15 12:06 bexelbie

Sure, and inofficially the test number is already available as $tests_ran. From what I can tell it seems like you actually want some support for test descriptions though. I'd favor adding a test_desc function or some such to assert.sh so that it could be properly hidden when running tests in non-verbose mode.

lehmannro avatar Jun 29 '15 18:06 lehmannro

test_desc would be nice, but at a minimum having a $test_number that corresponded to the outputs test number would be nice. I am trying to avoid having to carry a private variable for this or continually having to calculate $tests_ran +1

bexelbie avatar Jul 07 '15 10:07 bexelbie