]> diplodocus.org Git - nmh/blobdiff - test/mhbuild/test-cte
Fixed extra and missing trailing commas in SEE ALSO sections of man pages.
[nmh] / test / mhbuild / test-cte
index 1ccfe199441692114946cbfea97653dbdbebd642..4312c11e3e3d4d9112fc449fd1ec60064c056f40 100755 (executable)
@@ -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" <<EOF
 To: Mr Test <mrtest@example.com>
 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" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -76,6 +76,7 @@ Content-Transfer-Encoding: base64
 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NCg==
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -87,8 +88,6 @@ Fcc: +outbox
 This is a test of a mëssage with a shørt line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -100,6 +99,7 @@ Content-Transfer-Encoding: base64
 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQo=
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -111,8 +111,6 @@ Fcc: +outbox
 This is a test of a mëssäge with a shørt line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -124,6 +122,7 @@ Content-Transfer-Encoding: base64
 VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0K
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -136,8 +135,6 @@ This is a test of a message with a shørt line.
 This is a second line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -150,6 +147,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NClRoaXMgaXMg
 YSBzZWNvbmQgbGluZS4NCg==
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -162,8 +160,6 @@ This is a test of a mëssage with a shørt line.
 This is a second line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -176,6 +172,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQpUaGlzIGlz
 IGEgc2Vjb25kIGxpbmUuDQo=
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -188,8 +185,6 @@ This is a test of a mëssäge with a shørt line.
 This is a second line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -202,6 +197,7 @@ VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0KVGhpcyBp
 cyBhIHNlY29uZCBsaW5lLg0K
 EOF
 
+run_prog mhbuild "$draft"
 check "$draft" "$expected"
 
 cat > "$draft" <<EOF
@@ -220,8 +216,6 @@ This is a second line.
 
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 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" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -285,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" <<EOF
@@ -297,8 +291,6 @@ This is a test of a messege with a long line.  This line needs to be longer than
 This is a secönd line.
 EOF
 
-run_prog mhbuild "$draft"
-
 cat > "$expected" <<EOF
 To: Mr Test <mrtest@example.com>
 cc:
@@ -330,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" <<EOF
@@ -356,11 +349,9 @@ To: Mr Test <mrtest@example.com>
 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" <<EOF
 To: Mr Test <mrtest@example.com>
 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}