ash,hush: add a test that "continue" does not cripple traps
authorDenys Vlasenko <vda.linux@googlemail.com>
Sat, 1 Oct 2016 21:28:02 +0000 (23:28 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 1 Oct 2016 21:28:02 +0000 (23:28 +0200)
Both shells pass this test.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/ash-signals/continue_and_trap1.right [new file with mode: 0644]
shell/ash_test/ash-signals/continue_and_trap1.tests [new file with mode: 0755]
shell/hush_test/hush-signals/continue_and_trap1.right [new file with mode: 0644]
shell/hush_test/hush-signals/continue_and_trap1.tests [new file with mode: 0755]

diff --git a/shell/ash_test/ash-signals/continue_and_trap1.right b/shell/ash_test/ash-signals/continue_and_trap1.right
new file mode 100644 (file)
index 0000000..d2dd0af
--- /dev/null
@@ -0,0 +1 @@
+Exiting
diff --git a/shell/ash_test/ash-signals/continue_and_trap1.tests b/shell/ash_test/ash-signals/continue_and_trap1.tests
new file mode 100755 (executable)
index 0000000..2a5c147
--- /dev/null
@@ -0,0 +1,7 @@
+trap "echo Exiting; exit" INT
+
+(sleep 1; kill -s INT $$) &
+
+while continue; do
+        continue;
+done
diff --git a/shell/hush_test/hush-signals/continue_and_trap1.right b/shell/hush_test/hush-signals/continue_and_trap1.right
new file mode 100644 (file)
index 0000000..d2dd0af
--- /dev/null
@@ -0,0 +1 @@
+Exiting
diff --git a/shell/hush_test/hush-signals/continue_and_trap1.tests b/shell/hush_test/hush-signals/continue_and_trap1.tests
new file mode 100755 (executable)
index 0000000..2a5c147
--- /dev/null
@@ -0,0 +1,7 @@
+trap "echo Exiting; exit" INT
+
+(sleep 1; kill -s INT $$) &
+
+while continue; do
+        continue;
+done