diff options
author | Rob Landley <rob@landley.net> | 2014-09-20 13:09:14 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-09-20 13:09:14 -0500 |
commit | 387edf547eb09b27ca6d49772eb048d729f09cf4 (patch) | |
tree | 59d482f33735690cab6d90723393afa1e2c8dce5 /tests/md5sum.test | |
parent | d3df423a6cde0c6282658ff628574771d3824d71 (diff) | |
download | toybox-387edf547eb09b27ca6d49772eb048d729f09cf4.tar.gz |
Move testsuite out of scripts/test into its own top level tests directory, and make ctrl-c kill "make test" more reliably.
Diffstat (limited to 'tests/md5sum.test')
-rwxr-xr-x | tests/md5sum.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/md5sum.test b/tests/md5sum.test new file mode 100755 index 00000000..741ec62f --- /dev/null +++ b/tests/md5sum.test @@ -0,0 +1,22 @@ +#!/bin/bash + +[ -f testing.sh ] && . testing.sh + +#testing "name" "command" "result" "infile" "stdin" + +# These tests are from RFC 1321 appendix 5, reshuffled slightly to test +# varying argument numbers + +testing "md5sum ''" "md5sum" "d41d8cd98f00b204e9800998ecf8427e -\n" "" "" +testing "md5sum infile" "md5sum input" \ + "0cc175b9c0f1b6a831c399e269772661 input\n" "a" "" +testing "md5sum two files" "md5sum - input" \ + "900150983cd24fb0d6963f7d28e17f72 -\nf96b697d7cb7938d525a2f31aaf161d0 input\n" \ + "message digest" "abc" +testing "md5sum 4" "md5sum" "c3fcd3d76192e4007dfb496cca67e13b -\n" \ + "" "abcdefghijklmnopqrstuvwxyz" +testing "md5sum 5" "md5sum" "d174ab98d277d9f5a5611c2c9f419d9f -\n" \ + "" "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" +testing "md5sum 6" "md5sum" "57edf4a22be3c955ac49da2e2107b67a -\n" \ + "" "12345678901234567890123456789012345678901234567890123456789012345678901234567890" + |