A test for burst; still needs work.
authorKen Hornstein <kenh@pobox.com>
Thu, 1 Mar 2012 20:17:43 +0000 (15:17 -0500)
committerKen Hornstein <kenh@pobox.com>
Mon, 5 Mar 2012 16:22:39 +0000 (11:22 -0500)
Makefile.am
test/burst/test-burst [new file with mode: 0755]

index faa7485..7d8568f 100644 (file)
@@ -40,7 +40,9 @@ TESTS_ENVIRONMENT = MH_OBJ_DIR=@abs_builddir@ \
 ##
 ## Important note: the "cleanup" test should always be last
 ##
-TESTS = test/bad-input/test-header test/comp/test-comp-format \
+TESTS = test/bad-input/test-header \
+       test/burst/test-burst \
+       test/comp/test-comp-format \
        test/folder/test-create \
        test/folder/test-total test/format/test-localmbox \
        test/format/test-myname test/format/test-myhost \
diff --git a/test/burst/test-burst b/test/burst/test-burst
new file mode 100755 (executable)
index 0000000..872844c
--- /dev/null
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# Tests to see if bursting messages works correctly.
+#
+
+if test -z "${MH_OBJ_DIR}"; then
+    srcdir=`dirname "$0"`/../..
+    MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
+fi
+
+. "${MH_OBJ_DIR}/test/common.sh"
+
+setup_test
+
+#
+# Create a test message that we can burst
+#
+
+cat > "${MH_TEST_DIR}/Mail/inbox/11" <<EOF
+From: Test Burst Message <burst1@example.com>
+To: Test Recipient <recipient@example.com>
+Date: Friday, 29 Sep 2006 00:00:00
+Subject: Test digest
+
+------- Message one
+
+From: Mister Burster <burst2@example.com>
+To: Nobody 1 <nobody1@example.com>
+Date: Thursday, 28 Sep 2006 00:01:00
+Subject: Message one
+
+This is message one
+
+------- Message two
+
+From: Mister Burster <burst3@example.com>
+To: Nobody 2 <nobody2@example.com>
+Date: Thursday, 28 Sep 2006 00:02:00
+Subject: Message two
+
+This is message two
+For real.
+
+-------
+
+End of all messages
+EOF
+
+burst 11 || exit
+
+scan 11-last
+
+exit 0