X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d6366b583c87d112858cf8226de77fca852eea87..3fd48e6eae5634e7858729933d382f94709420d4:/test/mhshow/test-textcharset diff --git a/test/mhshow/test-textcharset b/test/mhshow/test-textcharset index 5d358d92..fae8c287 100755 --- a/test/mhshow/test-textcharset +++ b/test/mhshow/test-textcharset @@ -58,6 +58,7 @@ cat >>"$MH" <<'EOF' mhshow-show-text/plain: echo %{charset} EOF + # check expansion of %{charset} by itself msgfile=`mhpath new` cat >"$msgfile" <<'EOF' @@ -80,12 +81,13 @@ Subject: test display with %{charset} expansion MIME-Version: 1.0 -windows-1252 +UTF-8 EOF run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" + # check expansion of empty %{charset} by itself msgfile=`mhpath new` cat >"$msgfile" <<'EOF' @@ -114,6 +116,7 @@ EOF run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" + grep -v 'mhshow-show-text/plain:' "$MH" >"$MH.new" mv -f "$MH.new" "$MH" cat >>"$MH" <<'EOF' @@ -129,12 +132,13 @@ Subject: test display with %{charset} expansion MIME-Version: 1.0 --I windows-1252 +-I UTF-8 EOF run_prog mhshow -nopause prev >"$actual" 2>&1 check "$expected" "$actual" + # check expansion of empty embedded %{charset} with no text following cat >"$expected" <<'EOF' Date: Sun, 18 Dec 2005 00:52:39 +0100 @@ -150,6 +154,7 @@ EOF run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" + sed -e 's%\(mhshow-show-text/plain:.*\)%\1 file%' "$MH" >"$MH.new" mv -f "$MH.new" "$MH" @@ -162,12 +167,13 @@ Subject: test display with %{charset} expansion MIME-Version: 1.0 --I windows-1252 file +-I UTF-8 file EOF run_prog mhshow -nopause prev >"$actual" 2>&1 check "$expected" "$actual" + # check expansion of empty embedded %{charset} with text following cat >"$expected" <<'EOF' Date: Sun, 18 Dec 2005 00:52:39 +0100 @@ -183,6 +189,7 @@ EOF run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" + sed -e 's/charset/method/g' "$MH" >"$MH.new" mv -f "$MH.new" "$MH" @@ -214,6 +221,7 @@ EOF run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" + sed -e 's/method/unknown/g' "$MH" >"$MH.new" mv -f "$MH.new" "$MH" @@ -246,4 +254,37 @@ run_prog mhshow -nopause last >"$actual" 2>&1 check "$expected" "$actual" +grep -v '^mhshow-show-text/plain: ' "$MH" >>"$MH.new" +mv -f "$MH.new" "$MH" +cat >>"$MH" <"$msgfile" <<'EOF' +From: foo@example.edu +To: bar@example.edu +Subject: check parameter value quoting with text following +MIME-Version: 1.0 +Content-Type: text/plain +Date: Sun, 18 Dec 2005 00:52:39 +0100 + +This is a test. +EOF + +cat >"$expected" <<'EOF' +Date: Sun, 18 Dec 2005 00:52:39 +0100 +To: bar@example.edu +From: foo@example.edu +Subject: check parameter value quoting with text following + +MIME-Version: 1.0 + +EOF + +run_prog mhshow -nopause last >"$actual" 2>&1 +check "$expected" "$actual" + + exit $failed