diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2016-06-12 02:16:46 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2016-06-12 02:16:46 -0700 |
commit | 3a7719015d1c33f326b613449957a54855c939de (patch) | |
tree | 49e72309db8c1144b449e647523e31e58b020bb0 /tests | |
parent | 0ee03cbf988ae214be8061854a34d7212e2d2fab (diff) |
Don't allow specifying an fd with a caret redirection
For example, an argument 12345^ is a real argument, not a redirection
There's no reason to use ^ here instead of >, and it's annoying to git
users.
Fixes #1873
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test1.in | 3 | ||||
-rw-r--r-- | tests/test1.out | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/test1.in b/tests/test1.in index ff6075cc..6c3ba956 100644 --- a/tests/test1.in +++ b/tests/test1.in @@ -104,6 +104,9 @@ echo Test 5 $sta echo Test redirections begin ; echo output ; echo errput 1>&2 ; end 2>&1 | tee ../test/temp/tee_test.txt ; cat ../test/temp/tee_test.txt +# Test that trailing ^ doesn't trigger redirection, see #1873 +echo caret_no_redirect 12345^ + # Verify that we can pipe something other than stdout # The first line should be printed, since we output to stdout but pipe stderr to /dev/null # The second line should not be printed, since we output to stderr and pipe it to /dev/null diff --git a/tests/test1.out b/tests/test1.out index 26251a3b..1b5eeade 100644 --- a/tests/test1.out +++ b/tests/test1.out @@ -25,6 +25,7 @@ errput output errput output +caret_no_redirect 12345^ is_stdout abc\ndef abc |