aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-06-11 13:17:34 -0700
committerRob Landley <rob@landley.net>2018-06-12 14:03:20 -0500
commit42ad032a945ff437bc032b0882fb0ce3386bc247 (patch)
treedce5229134b598b9a0d7d83e862d9626cfad19e0
parent871c5d740a7f0b7e7ecda16bc23f3476acef4e7a (diff)
downloadtoybox-42ad032a945ff437bc032b0882fb0ce3386bc247.tar.gz
Add tests for file stdin behavior.
-rw-r--r--tests/file.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/file.test b/tests/file.test
index d749d960..93805569 100644
--- a/tests/file.test
+++ b/tests/file.test
@@ -22,4 +22,10 @@ testing "symlink" "file symlink" "symlink: symbolic link\n" "" ""
testing "symlink -h" "file -h symlink" "symlink: symbolic link\n" "" ""
testing "symlink -L" "file -L symlink" "symlink: Java class file, version 49.0\n" "" ""
-rm empty bash.script bash.script2 env.python.script ascii java.class symlink
+testing "- pipe" "cat java.class | file -" "-: Java class file, version 49.0\n" "" ""
+testing "- redirect" "file - <java.class" "-: Java class file, version 49.0\n" "" ""
+
+testing "/dev/zero" "file /dev/zero" "/dev/zero: character special\n" "" ""
+testing "- </dev/zero" "file - </dev/zero" "-: data\n" "" ""
+
+rm empty bash.script bash.script2 env.python.script ascii java.class