]> diplodocus.org Git - nmh/blobdiff - test/mhbuild/test-cte
More fixes (and tests) for the base64 encoder.
[nmh] / test / mhbuild / test-cte
index 128526a10588a3ed427f7788335bdffdf993477d..517fbc51b74a10eba61b9afb17d032ce5be2f1da 100755 (executable)
@@ -46,7 +46,8 @@ This is a test of a message with a sh=C3=B8rt line.
 EOF
 
 #
-# Force some text to be base64
+# Force some text to be base64, to test out the encoder.  Try at different
+# line lengths to check out the padding on the 
 #
 
 cat > "$draft" <<EOF
@@ -73,4 +74,28 @@ EOF
 
 check "$draft" "$expected"
 
+cat > "$draft" <<EOF
+To: Mr Test <mrtest@example.com>
+cc:
+Fcc: +outbox
+------
+#<text/plain *b64
+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:
+Fcc: +outbox
+MIME-Version: 1.0
+Content-Type: text/plain; charset="UTF-8"
+Content-Transfer-Encoding: base64
+
+VGhpcyBpcyBhIHRlc3Qgb2YgYSBtw6tzc2FnZSB3aXRoIGEgc2jDuHJ0IGxpbmUuDQo=
+EOF
+
+check "$draft" "$expected"
+
 exit ${failed:-0}