bashunit icon indicating copy to clipboard operation
bashunit copied to clipboard

Allow multiple asserts on standalone exit_code assertion

Open Chemaclass opened this issue 1 year ago • 0 comments

Related: https://github.com/TypedDevs/bashunit/pull/336#issuecomment-2379006750

Enable running an additional assertion over the generated output from assert_exit_code (docs).

Example 1

bashunit -a exit_code "1" "the_command" -a contains "some error"

Would be identical as:

OUTPUT=$(bashunit -a exit_code "1" "the_command")
bashunit -a contains "some error" $OUTPUT

Chemaclass avatar Sep 28 '24 14:09 Chemaclass