diff options
author | Rob Landley <rob@landley.net> | 2016-07-14 16:53:33 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-07-14 16:53:33 -0500 |
commit | c06ed8daaf1519026d1d92dd15e515886788398a (patch) | |
tree | 56cef35622a6fcc31472b5a6f6034f245fbebe85 /tests | |
parent | 246ec0f311926f4b7f5f32532b03794e952c4e29 (diff) | |
download | toybox-c06ed8daaf1519026d1d92dd15e515886788398a.tar.gz |
Add -c to md5sum and sha1sum.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/md5sum.test | 8 |
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" "" "" |