From f5603521ed2325c69c5b475dc2693175ba9e3b27 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Tue, 27 Oct 2015 23:11:51 +0100 Subject: [PATCH] Use cksum(1) instead of md5sum(1) in the tests cksum(1) is part of POSIX; md5sum(1) is not. --- test/tests/inc/cksums | 3 +++ test/tests/inc/md5sums | 3 --- test/tests/inc/test-deb359167 | 7 ++++--- test/tests/inc/test-eom-align | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 test/tests/inc/cksums delete mode 100644 test/tests/inc/md5sums diff --git a/test/tests/inc/cksums b/test/tests/inc/cksums new file mode 100644 index 0000000..a8667a7 --- /dev/null +++ b/test/tests/inc/cksums @@ -0,0 +1,3 @@ +4195362473 17161 filler.txt +3020538295 51 fromline.txt +525303352 121 msgheader.txt diff --git a/test/tests/inc/md5sums b/test/tests/inc/md5sums deleted file mode 100644 index 7f68baa..0000000 --- a/test/tests/inc/md5sums +++ /dev/null @@ -1,3 +0,0 @@ -4112b1460e11bd94d30944dd464a6662 filler.txt -023aad60eab43f06cf525869a833beb4 fromline.txt -4fda7f16b29d757413cb928d6ffc5aa5 msgheader.txt diff --git a/test/tests/inc/test-deb359167 b/test/tests/inc/test-deb359167 index 36cd1c2..8ca6395 100644 --- a/test/tests/inc/test-deb359167 +++ b/test/tests/inc/test-deb359167 @@ -10,9 +10,10 @@ require_prog valgrind TESTMBOX="$THISDIR/deb359167.mbox" -if [ "$(md5sum "$TESTMBOX" | cut -d ' ' -f 1)" != "e6ac458b8cccba2b2fd866fb505aeb5e" ]; then - echo "Test mailbox has been corrupted" - exit 1 +if [ "$(cksum "$TESTMBOX")" != \ + "2235746290 3324 tests/inc/deb359167.mbox" ]; then + echo "Test mailbox has been corrupted" + exit 1 fi valgrind --error-exitcode=1 --quiet inc -silent -file "$TESTMBOX" diff --git a/test/tests/inc/test-eom-align b/test/tests/inc/test-eom-align index 622774b..2b6afb4 100644 --- a/test/tests/inc/test-eom-align +++ b/test/tests/inc/test-eom-align @@ -21,8 +21,8 @@ fi # intact. (Since we're dealing in exact byte alignment # minor corruptions such as line ending changes could # render the tests useless.) -(cd "$THISDIR" && md5sum *.txt > "$MH_TEST_DIR/inctest.md5sums") -diff -u "$THISDIR/md5sums" "$MH_TEST_DIR/inctest.md5sums" +(cd "$THISDIR" && cksum *.txt > "$MH_TEST_DIR/inctest.cksums") +diff -u "$THISDIR/cksums" "$MH_TEST_DIR/inctest.cksums" FILLER="$THISDIR/filler.txt" FROMLINE="$THISDIR/fromline.txt" -- 1.7.10.4