Skip to content

Commit

Permalink
[spec/redirect] Simple substitution to make bash case fail on Travis.
Browse files Browse the repository at this point in the history
I don't know exactly why I need this, but I noticed that Travis' fd
state is not clean, or at least not the same as the bash on my desktop.

Related to PR #672.
  • Loading branch information
Andy Chu committed Mar 21, 2020
1 parent 089e2f0 commit b627479
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/redirect.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ cat "$TMP/f.txt"
## N-I mksh stdout-json: ""

#### 1>&2- (Bash bug: fail to restore closed fd)
exec 5> "$TMP/f.txt"
: 6>&5 5>&-
echo hello >&5
: 6>&5-
echo world >&5
exec 5>&-
exec 7> "$TMP/f.txt"
: 8>&7 7>&-
echo hello >&7
: 8>&7-
echo world >&7
exec 7>&-
cat "$TMP/f.txt"
## STDOUT:
hello
Expand Down

0 comments on commit b627479

Please sign in to comment.