diff --git a/tests/invocation/directory-redirect.err b/tests/invocation/directory-redirect.err new file mode 100644 index 000000000..ed2330550 --- /dev/null +++ b/tests/invocation/directory-redirect.err @@ -0,0 +1,3 @@ + fish: An error occurred while redirecting file '.' +open: Is a directory +RC: 1 diff --git a/tests/invocation/directory-redirect.err.SunOS b/tests/invocation/directory-redirect.err.SunOS new file mode 100644 index 000000000..e3e6b2534 --- /dev/null +++ b/tests/invocation/directory-redirect.err.SunOS @@ -0,0 +1,3 @@ + fish: An error occurred while redirecting file '.' +open: Invalid argument +RC: 1 diff --git a/tests/invocation/directory-redirect.invoke b/tests/invocation/directory-redirect.invoke new file mode 100644 index 000000000..84a002bea --- /dev/null +++ b/tests/invocation/directory-redirect.invoke @@ -0,0 +1 @@ +-c 'begin; end > . ; status -b; and echo "status -b returned true after bad redirect on a begin block"' diff --git a/tests/status.err b/tests/status.err index 855655277..87e63a330 100644 --- a/tests/status.err +++ b/tests/status.err @@ -1,5 +1,3 @@ - fish: An error occurred while redirecting file '.' -open: Is a directory status: Invalid combination of options, you cannot do both 'is-interactive' and 'is-login' in the same invocation status: Invalid combination of options, diff --git a/tests/status.in b/tests/status.in index 008255027..9f33badd6 100644 --- a/tests/status.in +++ b/tests/status.in @@ -8,12 +8,6 @@ begin or echo '"status -b" unexpectedly returned false inside a begin block' end -# Issue #1728 -# Bad file redirection on a block causes `status --is-block` to return 0 forever. -begin; end >. # . is a directory, it can't be opened for writing -status -b -and echo '"status -b" unexpectedly returned true after bad redirect on a begin block' - status -l and echo '"status -l" unexpectedly returned true for a non-login shell'