diff --git a/tests/interactive.expect.rc b/tests/interactive.expect.rc index 5900f5379..1dbf1405d 100644 --- a/tests/interactive.expect.rc +++ b/tests/interactive.expect.rc @@ -5,6 +5,7 @@ log_file -noappend interactive.tmp.log set fish ../test/root/bin/fish set fish_key_reader ../test/root/bin/fish_key_reader +set fish_test_helper ../test/root/bin/fish_test_helper set timeout 5 diff --git a/tests/pipeline.expect b/tests/pipeline.expect new file mode 100644 index 000000000..586e78d98 --- /dev/null +++ b/tests/pipeline.expect @@ -0,0 +1,16 @@ +# vim: set filetype=expect: +spawn $fish +expect_prompt + +send_line "function echo_wrap ; /bin/echo $argv ; sleep 0.1; ; end" +expect_prompt + +set timeout 10 +for {set x 0} {$x<15} {incr x} { + send_line "echo_wrap 1 2 3 4 | $fish_test_helper become_foreground_then_print_stderr ; or exit 1" + expect_prompt "become_foreground_then_print_stderr done" {} unmatched { puts stderr "fish_test_helper become_foreground_then_print_stderr failed"} +} + +# 'not' because we expect to have no jobs, in which case `jobs` will return false +send_line "not jobs" +expect_prompt "jobs: There are no jobs" {} unmatched { puts stderr "Should be no jobs" } diff --git a/tests/pipeline.expect.err b/tests/pipeline.expect.err new file mode 100644 index 000000000..e69de29bb diff --git a/tests/pipeline.expect.out b/tests/pipeline.expect.out new file mode 100644 index 000000000..e69de29bb