]> diplodocus.org Git - nmh/blobdiff - test/mhlist/test-mhlist
Fixed extra and missing trailing commas in SEE ALSO sections of man pages.
[nmh] / test / mhlist / test-mhlist
index 0fe40059fc643712325e038a65a8580c63ee36e8..366733e4e66bc27352a34cf668bcc483973d940e 100755 (executable)
@@ -16,7 +16,7 @@ fi
 
 setup_test
 
-mhlist - >/dev/null 2>&1 || true  # gcov
+check_exit '-eq 1' mhlist -
 
 expected=$MH_TEST_DIR/$$.expected
 actual=$MH_TEST_DIR/$$.actual
@@ -61,6 +61,23 @@ EOF
 run_prog mhlist -file - < "$MH_TEST_DIR/Mail/inbox/5" > $actual 2>&1
 check $expected $actual
 
+# Check message with no blank line separating the headers from the body.
+# Shouldn't make a difference to the size of the body part.
+# Bug meant no-blank-line case was one bigger by including the `\n'
+# ending the last header.
+f=$MH_TEST_DIR/$$.blank
+cat >$f-yes <<\E
+foo: bar
+
+body1
+body2
+E
+sed '/^$/d' $f-yes >$f-no
+run_prog mhlist -file $f-yes >$actual-yes
+run_prog mhlist -file $f-no >$actual-no
+check $actual-yes $actual-no
+rm $f-yes $f-no
+
 # check message number greater than highest
 run_test 'mhlist 11' "mhlist: message 11 doesn't exist"