set -e
-require_locale en_US.utf-8 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"
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:
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
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:
VGhpcyBpcyBhIHRlc3Qgb2YgYSBtZXNzYWdlIHdpdGggYSBzaMO4cnQgbGluZS4NCg==
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
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:
VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQo=
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
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:
VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc8OkZ2Ugd2l0aCBhIHNow7hydCBsaW5lLg0K
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
This is a second line.
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
YSBzZWNvbmQgbGluZS4NCg==
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
This is a second line.
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
IGEgc2Vjb25kIGxpbmUuDQo=
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
This is a second line.
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
cyBhIHNlY29uZCBsaW5lLg0K
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
aXMgaXMgYSBzZWNvbmQgbGluZS4NCg0KDQoNCg0K
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
#
This is a second line.
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
This is a second line.
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
This is a secönd line.
EOF
-run_prog mhbuild "$draft"
-
cat > "$expected" <<EOF
To: Mr Test <mrtest@example.com>
cc:
This is a sec=C3=B6nd line.
EOF
+run_prog mhbuild "$draft"
check "$draft" "$expected"
cat > "$draft" <<EOF
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:
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}