aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-07-14 16:53:33 -0500
committerRob Landley <rob@landley.net>2016-07-14 16:53:33 -0500
commitc06ed8daaf1519026d1d92dd15e515886788398a (patch)
tree56cef35622a6fcc31472b5a6f6034f245fbebe85 /tests
parent246ec0f311926f4b7f5f32532b03794e952c4e29 (diff)
downloadtoybox-c06ed8daaf1519026d1d92dd15e515886788398a.tar.gz
Add -c to md5sum and sha1sum.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/md5sum.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/md5sum.test b/tests/md5sum.test
index c4dfec94..f159d1ed 100755
--- a/tests/md5sum.test
+++ b/tests/md5sum.test
@@ -20,3 +20,11 @@ testing "5" "md5sum" "d174ab98d277d9f5a5611c2c9f419d9f -\n" \
testing "6" "md5sum" "57edf4a22be3c955ac49da2e2107b67a -\n" \
"" "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
+echo -n "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" > "te st"
+touch empty
+testing "-c spaces" "md5sum -c input || echo ok" \
+ "te st: OK\nempty: FAILED\n-: OK\nok\n" \
+"$(printf "d174ab98d277d9f5a5611c2c9f419d9f te st\n12345678901234567890123456789012 empty\nd41d8cd98f00b204e9800998ecf8427e -\n")" ""
+rm "te st" empty
+
+testing "-c nolines" "md5sum -c input 2>/dev/null || echo ok" "ok\n" "" ""