From b672e1891ef5a31986c54569b3a0186487b1e5c8 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 26 Jun 2019 11:07:46 -0700 Subject: [PATCH] Port signal tests to littlecheck --- tests/{signal.in => checks/signal.fish} | 22 ++++++++++++++++++++++ tests/signal.err | 0 tests/signal.out | 17 ----------------- 3 files changed, 22 insertions(+), 17 deletions(-) rename tests/{signal.in => checks/signal.fish} (50%) delete mode 100644 tests/signal.err delete mode 100644 tests/signal.out diff --git a/tests/signal.in b/tests/checks/signal.fish similarity index 50% rename from tests/signal.in rename to tests/checks/signal.fish index 118c1d2e5..00bd45ac7 100644 --- a/tests/signal.in +++ b/tests/checks/signal.fish @@ -1,8 +1,11 @@ +# RUN: %fish %s + function alarm --on-signal ALRM echo ALRM received end kill -s ALRM $fish_pid +# CHECK: ALRM received function anychild --on-process-exit 0 # Type and exit status @@ -11,10 +14,22 @@ end echo "command false:" command false +# CHECK: command false: +# CHECK: PROCESS_EXIT 1 +# CHECK: JOB_EXIT 0 + echo "command true:" command true +# CHECK: command true: +# CHECK: PROCESS_EXIT 0 +# CHECK: JOB_EXIT 0 + echo "command false | true:" command false | command true +# CHECK: command false | true: +# CHECK: PROCESS_EXIT 1 +# CHECK: PROCESS_EXIT 0 +# CHECK: JOB_EXIT 0 function test_blocks block -l @@ -22,4 +37,11 @@ function test_blocks echo "This should come before the event handler" end test_blocks +# CHECK: This is the process whose exit event shuld be blocked +# CHECK: This should come before the event handler + echo "Now event handler should have run" +# CHECK: PROCESS_EXIT 0 +# CHECK: JOB_EXIT 0 +# CHECK: Now event handler should have run +# CHECK: PROCESS_EXIT 0 diff --git a/tests/signal.err b/tests/signal.err deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/signal.out b/tests/signal.out deleted file mode 100644 index 10aa9b5f3..000000000 --- a/tests/signal.out +++ /dev/null @@ -1,17 +0,0 @@ -ALRM received -command false: -PROCESS_EXIT 1 -JOB_EXIT 0 -command true: -PROCESS_EXIT 0 -JOB_EXIT 0 -command false | true: -PROCESS_EXIT 1 -PROCESS_EXIT 0 -JOB_EXIT 0 -This is the process whose exit event shuld be blocked -This should come before the event handler -PROCESS_EXIT 0 -JOB_EXIT 0 -Now event handler should have run -PROCESS_EXIT 0