Readd bad-switch and directory-redirection tests

Made possible by the power of regex.
This commit is contained in:
Fabian Homborg 2019-06-25 21:12:49 +02:00
parent b9c1f4b122
commit 5c7b7fd609
8 changed files with 7 additions and 12 deletions

View File

@ -0,0 +1,2 @@
#RUN: %fish -Z
#CHECKERR: {{.*fish}}: {{unrecognized option: Z|invalid option -- '?Z'?}}

View 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

View File

@ -1,2 +0,0 @@
./fish: invalid option -- 'Z'
RC: 1

View File

@ -1,2 +0,0 @@
fish: invalid option -- Z
RC: 1

View File

@ -1 +0,0 @@
-Z

View File

@ -1,3 +0,0 @@
<W> fish: An error occurred while redirecting file '.'
open: Is a directory
RC: 1

View File

@ -1,3 +0,0 @@
<W> fish: An error occurred while redirecting file '.'
open: Invalid argument
RC: 1

View File

@ -1 +0,0 @@
-c 'begin; end > . ; status -b; and echo "status -b returned true after bad redirect on a begin block"'