mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 07:23:34 +08:00
Remove pipestatus expect test
This doesn't really do more than the check of the same name.
This commit is contained in:
parent
10fbdd34e7
commit
83808929a7
|
@ -1,79 +0,0 @@
|
|||
# vim: set filetype=expect:
|
||||
#
|
||||
# Verify `$pipestatus` is preserved to next prompt.
|
||||
|
||||
spawn $fish
|
||||
|
||||
expect_prompt
|
||||
|
||||
# no pipe
|
||||
send_line "true"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "0 : 0" {}
|
||||
send_line "false"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 : 1" {}
|
||||
|
||||
# no pipe but negated
|
||||
send_line "! true"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "0 : 1" {}
|
||||
send_line "! false"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 : 0" {}
|
||||
|
||||
# pipe
|
||||
send_line "false | true | false"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 0 1 : 1" {}
|
||||
|
||||
# pipe negated
|
||||
send_line "! false | true | false"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 0 1 : 0" {}
|
||||
|
||||
# pipe mixed with builtins and external
|
||||
send_line "command true | false | true | true"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "0 1 0 0 : 0" {}
|
||||
send_line "command true | command false | command false"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "0 1 1 : 1" {}
|
||||
send_line "sh -c 'exit 3' | command false | sh -c 'exit 5'"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "3 1 5 : 5" {}
|
||||
|
||||
# negated pipe with mixed builtin and external
|
||||
send_line "! sh -c 'exit 3' | command false | sh -c 'exit 5'"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "3 1 5 : 0" {}
|
||||
|
||||
# block
|
||||
send_line "command false | begin; command true; end | true"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 0 0 : 0" {}
|
||||
send_line "command false | begin; ! true; end | true"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "1 1 0 : 0" {}
|
||||
|
||||
# syntax error
|
||||
send_line "syntax terror"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "127 : 127" {}
|
||||
send_line "syntax | terror"
|
||||
expect_prompt
|
||||
send_line "echo \$pipestatus : \$status"
|
||||
expect_prompt "127 : 127" {}
|
Loading…
Reference in New Issue
Block a user