Use cksum(1) instead of md5sum(1) in the tests
authormarkus schnalke <meillo@marmaro.de>
Tue, 27 Oct 2015 22:11:51 +0000 (23:11 +0100)
committermarkus schnalke <meillo@marmaro.de>
Tue, 27 Oct 2015 22:11:51 +0000 (23:11 +0100)
cksum(1) is part of POSIX; md5sum(1) is not.

test/tests/inc/cksums [new file with mode: 0644]
test/tests/inc/md5sums [deleted file]
test/tests/inc/test-deb359167
test/tests/inc/test-eom-align

diff --git a/test/tests/inc/cksums b/test/tests/inc/cksums
new file mode 100644 (file)
index 0000000..a8667a7
--- /dev/null
@@ -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 (file)
index 7f68baa..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-4112b1460e11bd94d30944dd464a6662  filler.txt
-023aad60eab43f06cf525869a833beb4  fromline.txt
-4fda7f16b29d757413cb928d6ffc5aa5  msgheader.txt
index 36cd1c2..8ca6395 100644 (file)
@@ -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"
index 622774b..2b6afb4 100644 (file)
@@ -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"