tests: Adjusted most of the tests to mmh.
[mmh] / test / tests / show / test-qp
diff --git a/test/tests/show/test-qp b/test/tests/show/test-qp
new file mode 100644 (file)
index 0000000..f702379
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/sh
+######################################################
+#
+# Test quoted-printable decoding.
+#
+######################################################
+
+set -e
+
+expected=$MH_TEST_DIR/$$.expected
+actual=$MH_TEST_DIR/$$.actual
+
+# Write message with bogus quoted-printable data.
+msgfile=$(mhpath b)
+msgnum=$(basename $msgfile)
+cat > $msgfile <<EOF
+From: foo@example.edu
+To: bar@example.edu
+Subject: test
+MIME-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Date: Sun, 18 Dec 2005 00:52:39 +0100
+
+=3D
+=3d
+ignored space at end 
+ignored tab at end     
+just a newline =
+
+==3d ====3D
+=      just a tab
+= just a space
+=cl
+=l with a space
+=l
+=\b ^H (backspace) character, probably erased = in diff output
+EOF
+
+# check it
+cat > $expected <<EOF
+Date:    Sun, 18 Dec 2005 00:52:39 +0100
+From:    foo@example.edu
+To:      bar@example.edu
+Subject: test
+
+part       text/plain                 181
+=
+=
+ignored space at end
+ignored tab at end
+just a newline 
+== ====
+=      just a tab
+= just a space
+=cl
+=l with a space
+=l
+=\b ^H (backspace) character, probably erased = in diff output
+EOF
+show $msgnum > $actual 2>&1
+diff -u $expected $actual