diff --git a/tests/test4.err b/tests/test4.err index e69de29bb..c344381d6 100644 --- a/tests/test4.err +++ b/tests/test4.err @@ -0,0 +1,12 @@ + +#################### +# Test scoping rules for functions + +#################### +# Verify subcommand statuses + +#################### +# Verify that set passes through exit status, except when passed -n or -q or -e + +#################### +# Verify set -ql behavior (#2502) diff --git a/tests/test4.in b/tests/test4.in index eba51c3e4..91539e690 100644 --- a/tests/test4.in +++ b/tests/test4.in @@ -1,4 +1,4 @@ -#Test scoping rules for functions +logmsg Test scoping rules for functions set -e smurf @@ -161,10 +161,10 @@ end; set -U -e baz -echo "# Verify subcommand statuses" +logmsg Verify subcommand statuses echo (false) $status (true) $status (false) $status -echo "# Verify that set passes through exit status, except when passed -n or -q or -e" +logmsg Verify that set passes through exit status, except when passed -n or -q or -e false ; set foo bar ; echo 1 $status # passthrough true ; set foo bar ; echo 2 $status # passthrough false ; set -q foo ; echo 3 $status # no passthrough @@ -178,7 +178,7 @@ false ; set foo (echo A; true) ; echo 10 $status $foo true ; set foo (echo B; false) ; echo 11 $status $foo true -echo "# Verify set -ql behavior" # see 2502 +logmsg "Verify set -ql behavior (#2502)" function setql_check set -l setql_foo val if set -ql setql_foo diff --git a/tests/test4.out b/tests/test4.out index ede533712..3054a0162 100644 --- a/tests/test4.out +++ b/tests/test4.out @@ -1,3 +1,6 @@ + +#################### +# Test scoping rules for functions Test 1 pass Test 2 pass Test 3 pass @@ -20,8 +23,12 @@ Test 19 pass Test 20 pass Test 21 pass Test 22 pass + +#################### # Verify subcommand statuses 1 0 1 + +#################### # Verify that set passes through exit status, except when passed -n or -q or -e 1 1 2 0 @@ -34,5 +41,7 @@ Test 22 pass 9 121 10 0 A 11 1 B -# Verify set -ql behavior + +#################### +# Verify set -ql behavior (#2502) Pass