From d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Tue, 1 Feb 2022 04:08:59 -0500 Subject: Add basic `defer` implementation. We don't have any closures yet, so it's essentially the same as just moving the statement after the `defer` keyword to the end of the block/ right before returning from the function. --- tests/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/common.sh') diff --git a/tests/common.sh b/tests/common.sh index 1047708..965975c 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -57,7 +57,7 @@ function assert_stdout_text() { echo "----------------------------------------------" echo "Test failed: executable returned non-0 code" echo "----------------------------------------------" - echo "$code" + echo "$1" exit 1 fi if [[ "$output" != $2 ]] -- cgit v1.2.3