Browse Source

[enh] add unit tests for redirections from one fd to an other.

Moul 4 years ago
parent
commit
cd62f4c7d5
1 changed files with 4 additions and 0 deletions
  1. 4 0
      tests.sh

+ 4 - 0
tests.sh

@@ -81,6 +81,7 @@ tests=(
 "ls 2>&-"
 "mkdir -p 2>&-"
 "mkdir -p 1>&-"
+
 ### Redirection opened
 "echo test 1>&2"
 "echo test >&2"
@@ -88,6 +89,9 @@ tests=(
 #"echo test 2>>&1" # create file named "1"
 "echo test 2<&1"
 
+"mkdir -p 2>&1 | cat -e" # La sortie doit être : "rm: nosuchfile: No such file or directory$"
+"echo No dollar character 1>&2 | cat -e" # La sortie doit être "No dollar character".
+
 ## Segfault and parsing tests on redirections
 ">"
 "ls>"