2019-04-04 23:41:25 +08:00
|
|
|
# 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
|
2019-04-08 06:00:13 +08:00
|
|
|
for {set x 0} {$x<5} {incr x} {
|
2019-04-04 23:41:25 +08:00
|
|
|
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" }
|
2019-04-08 04:08:37 +08:00
|
|
|
|
|
|
|
send_line "function inner ; command true ; end; function outer; inner; end"
|
|
|
|
expect_prompt
|
2019-04-08 06:00:13 +08:00
|
|
|
for {set x 0} {$x<5} {incr x} {
|
2019-04-08 04:08:37 +08:00
|
|
|
send_line "outer | $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"}
|
|
|
|
}
|
|
|
|
|
|
|
|
send_line "not jobs"
|
|
|
|
expect_prompt "jobs: There are no jobs" {} unmatched { puts stderr "Should be no jobs" }
|