#!/bin/sh ###################################################### # # Test repl -convertarg # ###################################################### set -e if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname $0`/../.. MH_OBJ_DIR=`cd $srcdir && pwd`; export MH_OBJ_DIR fi . "${srcdir}/test/post/test-post-common.sh" expected="$MH_TEST_DIR/test-url$$.expected" actual=`mhpath +`/draft printf 'Local-Mailbox: recipient@example.com\n' >>"$MH" #### Make sure that this works with 7-bit encoding. LC_ALL=C; export LC_ALL # check if urls get broken start_test 'long urls get broken on reply' cat >"$expected" <<'EOF' From: recipient@example.com To: sender@example.com cc: Fcc: +outbox Subject: Re: test Comments: In-reply-to sender@example.com message dated "Thu, 11 Dec 2014 08:19:02 -0600." -------- sender@example.com writes: > https://example.com/realy/long/path/to/some/importent/document/with/i/need/to/reference/in/the/reply/because/it/is/realy/importent/and/has/also/some/random/string/in/it/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/but/is/not/longer/than/900/chars/because/it/is/still/a/valide/mail.html EOF cat >`mhpath new` <<'EOF' From: sender@example.com To: recipient@example.com Subject: test Date: Thu, 11 Dec 2014 08:19:02 -0600 https://example.com/realy/long/path/to/some/importent/document/with/i/need/to/reference/in/the/reply/because/it/is/realy/importent/and/has/also/some/random/string/in/it/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/but/is/not/to/long/because/it/is/still/a/valide/mail.html EOF repl -editor true -nowhatnowproc -format last check "$actual" "$expected" #### Make sure that this works with 8-bit encoding. finish_test exit ${failed:-0}