mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 03:13:37 +08:00
Readd bad-switch and directory-redirection tests
Made possible by the power of regex.
This commit is contained in:
parent
b9c1f4b122
commit
5c7b7fd609
2
tests/checks/bad-option.fish
Normal file
2
tests/checks/bad-option.fish
Normal file
|
@ -0,0 +1,2 @@
|
|||
#RUN: %fish -Z
|
||||
#CHECKERR: {{.*fish}}: {{unrecognized option: Z|invalid option -- '?Z'?}}
|
5
tests/checks/directory-redirect.fish
Normal file
5
tests/checks/directory-redirect.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
#RUN: %fish -c 'begin; end > . ; status -b; and echo "status -b returned true after bad redirect on a begin block"; echo $status'
|
||||
# Note that we sometimes get fancy quotation marks here, so let's match three characters
|
||||
#CHECKERR: <W> fish: An error occurred while redirecting file {{...}}
|
||||
#CHECKERR: {{open: Is a directory|open: Invalid argument}}
|
||||
#CHECK: 1
|
|
@ -1,2 +0,0 @@
|
|||
./fish: invalid option -- 'Z'
|
||||
RC: 1
|
|
@ -1,2 +0,0 @@
|
|||
fish: invalid option -- Z
|
||||
RC: 1
|
|
@ -1 +0,0 @@
|
|||
-Z
|
|
@ -1,3 +0,0 @@
|
|||
<W> fish: An error occurred while redirecting file '.'
|
||||
open: Is a directory
|
||||
RC: 1
|
|
@ -1,3 +0,0 @@
|
|||
<W> fish: An error occurred while redirecting file '.'
|
||||
open: Invalid argument
|
||||
RC: 1
|
|
@ -1 +0,0 @@
|
|||
-c 'begin; end > . ; status -b; and echo "status -b returned true after bad redirect on a begin block"'
|
Loading…
Reference in New Issue
Block a user