]> diplodocus.org Git - nmh/commitdiff
test/inc/test-eom-align: Fix tests; they've never worked.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sat, 20 May 2017 11:38:22 +0000 (12:38 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sat, 20 May 2017 11:38:22 +0000 (12:38 +0100)
Instead of cycling through lots of mbox sizes, $STDIO_BUFSZ was always
used as the desired size resulting in tests A and B being duplicated 221
times each.  Slowly, if using valgrind.  The tests fail now they're
fixed.

test/inc/test-eom-align

index aa470c3..146c948 100755 (executable)
@@ -95,7 +95,7 @@ makembox_B () {
 # Do a single test with message one's body of size sz.
 do_one_test_A () {
   SZ=$1
 # Do a single test with message one's body of size sz.
 do_one_test_A () {
   SZ=$1
-  makembox_A "$MH_TEST_DIR/eom-align.mbox" $STDIO_BUFSZ
+  makembox_A "$MH_TEST_DIR/eom-align.mbox" $SZ
   $VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
   # We know the messages should be 11 and 12 in inbox
   # Now get the bodies back out.
   $VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
   # We know the messages should be 11 and 12 in inbox
   # Now get the bodies back out.
@@ -112,7 +112,7 @@ do_one_test_A () {
 # Do a test type B
 do_one_test_B () {
   SZ=$1
 # Do a test type B
 do_one_test_B () {
   SZ=$1
-  makembox_B "$MH_TEST_DIR/eom-align.mbox" $STDIO_BUFSZ
+  makembox_B "$MH_TEST_DIR/eom-align.mbox" $SZ
   $VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
   # We know the message should be 11 in the inbox
   body1="$MH_TEST_DIR/eom-align.inbox.body1"
   $VALGRIND inc -silent -file "$MH_TEST_DIR/eom-align.mbox"
   # We know the message should be 11 in the inbox
   body1="$MH_TEST_DIR/eom-align.inbox.body1"