]> diplodocus.org Git - nmh/blobdiff - test/mhfixmsg/test-mhfixmsg
Added -[no]crlflinebreaks switches to mhfixmsg(1).
[nmh] / test / mhfixmsg / test-mhfixmsg
index 323fb72aa4f87a7598d31626bc189294d2c626d5..77de37da7fb42953b3b20cc0b98bbc361116093f 100755 (executable)
@@ -52,6 +52,7 @@ Usage: mhfixmsg [+folder] [msgs] [switches]
   -decodetext 8bit|7bit
   -nodecodetext
   -decodetypes
+  -[no]crlflinebreaks
   -[no]textcharset
   -[no]reformat
   -[no]replacetextplain
@@ -1053,7 +1054,7 @@ run_test 'mhfixmsg last -outfile '"$actual" ''
 check "$expected" "$actual"
 
 
-# check stripping of CRs from ASCII text context
+# check not stripping of CRs from ASCII text context (default)
 cat >"$expected" <<EOF
 MIME-Version: 1.0
 From: sender@example.com
@@ -1061,8 +1062,8 @@ To: recipient@example.com
 Subject: message with CR's
 Date: Mon, 29 Apr 2013 11:51:45 -0400
 
-There are two CR-LF pairs at the end of this sentence.
-
+There are two CR-LF pairs at the end of this sentence.\r
+\r
 EOF
 
 cat >`mhpath new` <<'EOF'
@@ -1080,6 +1081,33 @@ run_prog mhfixmsg last -outfile "$actual"
 check "$expected" "$actual"
 
 
+# check stripping of CRs from ASCII text context
+cat >"$expected" <<EOF
+MIME-Version: 1.0
+From: sender@example.com
+To: recipient@example.com
+Subject: message with CR's
+Date: Mon, 29 Apr 2013 11:51:45 -0400
+
+There were two CR-LF pairs at the end of this sentence.
+
+EOF
+
+cat >`mhpath new` <<'EOF'
+MIME-Version: 1.0
+From: sender@example.com
+To: recipient@example.com
+Subject: message with CR's
+Date: Mon, 29 Apr 2013 11:51:45 -0400
+
+There were two CR-LF pairs at the end of this sentence.\r
+\r
+EOF
+
+run_prog mhfixmsg last -outfile "$actual" -nocrlflinebreaks
+check "$expected" "$actual"
+
+
 # check -replacetextplain
 prepare_space >"$expected" <<EOF
 To: recipient@example.com