X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/0d3875d020fb17d34918f5e81ee7f87fbc5d1565..f9754b35f2f3b4c5cb0890f154181d2bab66c679:/test/mhbuild/test-cte diff --git a/test/mhbuild/test-cte b/test/mhbuild/test-cte index b63f1998..4312c11e 100755 --- a/test/mhbuild/test-cte +++ b/test/mhbuild/test-cte @@ -16,8 +16,7 @@ setup_test set -e -require_locale en_US.utf8 -LC_ALL=en_US.UTF-8; export LC_ALL +require_locale en_US.UTF-8 en_US.UTF8 en_US.utf-8 en_US.utf8 draft="$MH_TEST_DIR/$$.draft" backup="${MH_TEST_DIR}/`mhparam sbackup`$$.draft.orig" @@ -36,8 +35,6 @@ Fcc: +outbox This is a test of a message with a shørt line. EOF -run_prog mhbuild "$draft" - cat > "$expected" < cc: @@ -49,6 +46,9 @@ Content-Transfer-Encoding: quoted-printable This is a test of a message with a sh=C3=B8rt line. EOF +run_prog mhbuild "$draft" +check "$draft" "$expected" + # # Force some text to be base64, to test out the encoder. Try at different # line lengths to check out the padding on the routines to convert LF to @@ -65,8 +65,6 @@ Fcc: +outbox This is a test of a message with a shørt line. EOF -run_prog mhbuild "$draft" - cat > "$expected" < cc: @@ -78,6 +76,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NCg== EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -102,6 +99,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQo= EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -126,6 +122,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -152,6 +147,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NClRoaXMgaXMg YSBzZWNvbmQgbGluZS4NCg== EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -178,6 +172,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQpUaGlzIGlz IGEgc2Vjb25kIGxpbmUuDQo= EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -204,6 +197,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0KVGhpcyBp cyBhIHNlY29uZCBsaW5lLg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -236,6 +228,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0KDQoNClRo aXMgaXMgYSBzZWNvbmQgbGluZS4NCg0KDQoNCg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" # @@ -254,8 +247,6 @@ This is a test of a messege with a long line. This line needs to be longer than This is a second line. EOF -run_prog mhbuild "$draft" - cat > "$expected" < cc: @@ -287,6 +278,7 @@ the airs from that infernal nonsense Pinafore. = This is a second line. EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -332,6 +322,7 @@ the airs from that infernal nonsense Pinafore. = This is a sec=C3=B6nd line. EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -374,6 +363,7 @@ Content-Transfer-Encoding: 8bit This is the test of a lønger line than the usual limit. Assuming we set the maxunencded parameter properly, this should end up as 8bit? EOF +run_prog mhbuild -maxunencoded 200 "$draft" check "$draft" "$expected" [ ${failed:=0} -eq 0 ] && rm -f ${backup}