X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1e0b1d40a6285c532b722f4584fa7ddde220deff..cfb444d37fc236a9fdac369cbcf2a5bfc37a33f5:/test/mhlist/test-mhlist?ds=sidebyside diff --git a/test/mhlist/test-mhlist b/test/mhlist/test-mhlist index e5fc895c..366733e4 100755 --- a/test/mhlist/test-mhlist +++ b/test/mhlist/test-mhlist @@ -16,6 +16,8 @@ fi setup_test +check_exit '-eq 1' mhlist - + expected=$MH_TEST_DIR/$$.expected actual=$MH_TEST_DIR/$$.actual @@ -59,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"