]> diplodocus.org Git - nmh/blobdiff - test/mhshow/test-textcharset
Merge branch 'mhshow-fixup'
[nmh] / test / mhshow / test-textcharset
index 5d358d929cb7b2a3e0c251c99eea110cc1bd3b11..5fc07e6e927afc8698d18ef6467d5f272e059f38 100755 (executable)
@@ -47,17 +47,18 @@ Subject: test display with charset conversion
 
 MIME-Version: 1.0
 
-part       text/plain                  10
+part       text/plain                  11
 4 รท 2 = 2
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual"
 
 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
+run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual"
 
+
 # check expansion of empty %{charset} by itself
 msgfile=`mhpath new`
 cat >"$msgfile" <<'EOF'
@@ -111,9 +113,10 @@ MIME-Version: 1.0
 
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow 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
+run_prog mhshow 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
@@ -147,9 +151,10 @@ MIME-Version: 1.0
 
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow 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
+run_prog mhshow 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
@@ -180,9 +186,10 @@ MIME-Version: 1.0
 file
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual"
 
+
 sed -e 's/charset/method/g' "$MH" >"$MH.new"
 mv -f "$MH.new" "$MH"
 
@@ -211,9 +218,10 @@ MIME-Version: 1.0
 -I $QUOTEME' file
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
 check "$expected" "$actual"
 
+
 sed -e 's/method/unknown/g' "$MH" >"$MH.new"
 mv -f "$MH.new" "$MH"
 
@@ -242,7 +250,40 @@ MIME-Version: 1.0
 file
 EOF
 
-run_prog mhshow -nopause last >"$actual" 2>&1
+run_prog mhshow last >"$actual" 2>&1
+check "$expected" "$actual"
+
+
+grep -v '^mhshow-show-text/plain: ' "$MH" >>"$MH.new"
+mv -f "$MH.new" "$MH"
+cat >>"$MH" <<EOF
+mhshow-show-text/plain: true '%F' %F
+EOF
+
+# check parameter value quoting with text following
+msgfile=`mhpath new`
+cat >"$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 last >"$actual" 2>&1
 check "$expected" "$actual"