diff options
Diffstat (limited to 'tests/018')
-rw-r--r-- | tests/018/forkflush.expected | 12 | ||||
-rw-r--r-- | tests/018/forkflush.tl | 31 |
2 files changed, 43 insertions, 0 deletions
diff --git a/tests/018/forkflush.expected b/tests/018/forkflush.expected new file mode 100644 index 00000000..475f87b1 --- /dev/null +++ b/tests/018/forkflush.expected @@ -0,0 +1,12 @@ +A +B +C +D +E +F +G +H +I +J +K +L diff --git a/tests/018/forkflush.tl b/tests/018/forkflush.tl new file mode 100644 index 00000000..078fe2b9 --- /dev/null +++ b/tests/018/forkflush.tl @@ -0,0 +1,31 @@ +(load "../common") + +(push-after-load (remove-path "tmpfile")) + +(with-stream (*stdout* (open-file "tmpfile" "w")) + (put-line "A") + (sh "echo B") + (put-line "C") + (sh "echo D")) + +(put-string (file-get-string "tmpfile")) + +(with-stream (*stdout* (open-file "tmpfile" "w")) + (put-line "E") + (with-stream (s (open-process "cat" "w")) + (put-line "F" s)) + (put-line "G") + (with-stream (s (open-process "cat" "w")) + (put-line "H" s))) + +(put-string (file-get-string "tmpfile")) + +(with-stream (*stdout* (open-file "tmpfile" "w")) + (put-line "I") + (with-stream (s (open-command "cat" "w")) + (put-line "J" s)) + (put-line "K") + (with-stream (s (open-command "cat" "w")) + (put-line "L" s))) + +(put-string (file-get-string "tmpfile")) |