Bug #66407: Enhance test-pop to test a long text line.
Test inc/test-pop now includes a message with a text line longer than
fits in any internal buffer. The test with this enhancement fails;
the failure is bug #66407. A later patch enhances the code so that
this test will pass.
diff --git a/test/inc/test-pop b/test/inc/test-pop
index 8b3fbe03..ec47ca3c 100755
--- a/test/inc/test-pop
+++ b/test/inc/test-pop
@@ -2,8 +2,6 @@
######################################################
#
# Test POP support in inc
-# Only tests checking of local maildrop, does not
-# test checking of POP server.
#
######################################################
@@ -49,6 +47,16 @@ Hey man, how's it going?
.
Hope you're doing better.
EOM
+# Test that inc can handle a message body with a long line.
+# (There are a few mail-senders that (incorrectly) generate image/jpeg
+# parts with no newlines, resulting in one very long encoded line.)
+long_line=${MH_TEST_LONG_LINE:-50000}
+while [ "$long_line" -gt 0 ]; do
+ printf 'Abcdefghijklmnopqrstuvwxyz.. ' >> "$testmessage"
+ arith_eval "$long_line" - 29
+ long_line=$arith_val
+done
+echo >> "$testmessage"
cat > "${testmessage}.2" <<EOM
Received: From somewhere