X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/70c96d95b9ff6e9e03b1cd78f3d6a24cd52a8b4b..6db45651:/test/mhbuild/test-cte?ds=sidebyside diff --git a/test/mhbuild/test-cte b/test/mhbuild/test-cte index f1e2b031..4312c11e 100755 --- a/test/mhbuild/test-cte +++ b/test/mhbuild/test-cte @@ -16,9 +16,10 @@ setup_test set -e -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" expected="$MH_TEST_DIR/$$.expected" # @@ -34,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: @@ -47,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 @@ -63,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: @@ -76,6 +76,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NCg== EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -100,6 +99,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQo= EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -124,6 +122,7 @@ Content-Transfer-Encoding: base64 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -150,6 +147,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NClRoaXMgaXMg YSBzZWNvbmQgbGluZS4NCg== EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -176,6 +172,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQpUaGlzIGlz IGEgc2Vjb25kIGxpbmUuDQo= EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -202,6 +197,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0KVGhpcyBp cyBhIHNlY29uZCBsaW5lLg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -234,6 +228,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0KDQoNClRo aXMgaXMgYSBzZWNvbmQgbGluZS4NCg0KDQoNCg0K EOF +run_prog mhbuild "$draft" check "$draft" "$expected" # @@ -252,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: @@ -275,16 +268,17 @@ rential calculus; I know the scientific names of beings animalculous: In s= hort, in matters vegetable, animal, and mineral, I am the very model of a = modern Major-General. I know our mythic history, King Arthur's and Sir Car= adoc's; I answer hard acrostics, I've a pretty taste for paradox, I quote = -in elegiacs all the crimes of Heliogabalus, In conics I can = -floor peculiarities parabolous; I can tell undoubted Raphaels from Gerard = -Dows and Zoffanies, I know the croaking chorus from The Frogs of Aristopha= -nes! Then I can hum a fugue of which I've heard the music's din afore, An= -d whistle all the airs from that infernal nonsense Pinafore. = +in elegiacs all the crimes of Heliogabalus, In conics I can floor peculiar= +ities parabolous; I can tell undoubted Raphaels from Gerard Dows and Zoffa= +nies, I know the croaking chorus from The Frogs of Aristophanes! Then I c= +an hum a fugue of which I've heard the music's din afore, And whistle all = +the airs from that infernal nonsense Pinafore. = This is a second line. EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < "$expected" < cc: @@ -320,16 +312,17 @@ rential calculus; I know the scientific names of beings animalculous: In s= hort, in matters vegetable, animal, and mineral, I am the very model of a = modern Major-General. I know our mythic history, King Arthur's and Sir Car= adoc's; I answer hard acrostics, I've a pretty taste for paradox, I quote = -in elegiacs all the crimes of Heliogabalus, In conics I can = -floor peculiarities parabolous; I can tell undoubted Raphaels from Gerard = -Dows and Zoffanies, I know the croaking chorus from The Frogs of Aristopha= -nes! Then I can hum a fugue of which I've heard the music's din afore, An= -d whistle all the airs from that infernal nonsense Pinafore. = +in elegiacs all the crimes of Heliogabalus, In conics I can floor peculiar= +ities parabolous; I can tell undoubted Raphaels from Gerard Dows and Zoffa= +nies, I know the croaking chorus from The Frogs of Aristophanes! Then I c= +an hum a fugue of which I've heard the music's din afore, And whistle all = +the airs from that infernal nonsense Pinafore. = This is a sec=C3=B6nd line. EOF +run_prog mhbuild "$draft" check "$draft" "$expected" cat > "$draft" < cc: Fcc: +outbox ------ -This is the test of a lønger line than the ususal limit. Assuming we set the maxunencded parameter properly, this should end up as 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" - cat > "$expected" < cc: @@ -369,9 +360,12 @@ MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit -This is the test of a lønger line than the ususal limit. Assuming we set the maxunencded parameter properly, this should end up as 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} + exit ${failed:-0}