From 32a86a84c014b11890b72c1b5a3f74d483700701 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Tue, 26 Apr 2022 15:23:30 +0300 Subject: [PATCH] Show output for assert_line() and refure_line() Required for diagnostics --- test/test_helper.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_helper.bash b/test/test_helper.bash index a0fb24cb..4e32df30 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -84,7 +84,8 @@ assert_line() { for line in "${lines[@]}"; do if [ "$line" = "$1" ]; then return 0; fi done - flunk "expected line \`$1'" + flunk "expected line \`$1'" $'\n'\ + "output: $output" fi } @@ -98,7 +99,8 @@ refute_line() { local line for line in "${lines[@]}"; do if [ "$line" = "$1" ]; then - flunk "expected to not find line \`$line'" + flunk "expected to not find line \`$line'" $'\n'\ + "output: $output" fi done fi