hush: fix set -n to act immediately, not just after run_list()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
2
shell/hush_test/hush-misc/exitcode_trap7.right
Normal file
2
shell/hush_test/hush-misc/exitcode_trap7.right
Normal file
@@ -0,0 +1,2 @@
|
||||
Start
|
||||
Ok:0
|
7
shell/hush_test/hush-misc/exitcode_trap7.tests
Executable file
7
shell/hush_test/hush-misc/exitcode_trap7.tests
Executable file
@@ -0,0 +1,7 @@
|
||||
$THIS_SH -c '
|
||||
cleanup() { set +e; false; }
|
||||
set -e
|
||||
trap cleanup EXIT
|
||||
echo Start
|
||||
'
|
||||
echo Ok:$?
|
3
shell/hush_test/hush-misc/set-n1.right
Normal file
3
shell/hush_test/hush-misc/set-n1.right
Normal file
@@ -0,0 +1,3 @@
|
||||
set -n stops in -c?
|
||||
YES
|
||||
Ok:0
|
2
shell/hush_test/hush-misc/set-n1.tests
Executable file
2
shell/hush_test/hush-misc/set-n1.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
$THIS_SH -c "echo 'set -n stops in -c?'; set -n; echo NO" && echo YES
|
||||
echo Ok:$?
|
Reference in New Issue
Block a user