diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-01 04:08:59 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-01 04:08:59 -0500 |
| commit | d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc (patch) | |
| tree | 9399d12700c3d975a95b0946833dc419b3268419 /tests/common.sh | |
| parent | Testing: Add support for testing stdout results, check builtins (diff) | |
| download | cup-d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc.tar.xz cup-d471a41369690a9d2d9b8862ea5ff0ae9cbe40fc.zip | |
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.
Diffstat (limited to 'tests/common.sh')
| -rw-r--r-- | tests/common.sh | 2 |
1 files changed, 1 insertions, 1 deletions
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 ]] |