diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-13 02:49:41 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2014-01-13 02:49:41 -0800 |
commit | d9056081e78cc847574589d8ca31f2e25a82b6f5 (patch) | |
tree | 502538a6c2b6e1e032ee3a5c49dce6de55c14691 /tests/test1.in | |
parent | 95f87cdd56602fe7c2746519f875741c325d2df8 (diff) |
Added tests for piping an fd other than stdout
Diffstat (limited to 'tests/test1.in')
-rw-r--r-- | tests/test1.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test1.in b/tests/test1.in index c180159c..7f60a4da 100644 --- a/tests/test1.in +++ b/tests/test1.in @@ -15,7 +15,7 @@ echo x-{1} echo x-{1,2} echo foo-{1,2{3,4}} -# Escpaed newlines +# Escaped newlines echo foo\ bar echo foo\ bar @@ -99,6 +99,12 @@ echo Test 5 $sta echo Test redirections begin ; echo output ; echo errput 1>&2 ; end 2>&1 | tee /tmp/tee_test.txt ; cat /tmp/tee_test.txt +# 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 +begin ; echo is_stdout ; end 2>| cat > /dev/null +begin ; echo is_stderr 1>&2 ; end 2>| cat > /dev/null + # echo tests echo 'abc\ndef' |