]> diplodocus.org Git - nmh/blobdiff - test/mhlist/test-mhlist
Merge branch 'encode-rfc2047'
[nmh] / test / mhlist / test-mhlist
index c1bac06a2e21ac62d7f49891fa519711303586e1..ad0fb4bb941b5313a251dab8d7510c21574067ce 100755 (executable)
@@ -26,7 +26,7 @@ run_test 'mhlist' 'mhlist: no cur message'
 # check with no options and current message
 folder +inbox 5 > /dev/null
 cat > $expected <<EOF
- msg part  type/subtype              size description                         
+ msg part  type/subtype              size description
    5       text/plain                  25
 EOF
 mhlist > $actual 2>&1
@@ -53,7 +53,7 @@ check $expected $actual
 
 # check -file -
 cat > $expected <<EOF
- msg part  type/subtype              size description                         
+ msg part  type/subtype              size description
    0       text/plain                  25
 EOF
 mhlist -file - < "$MH_TEST_DIR/Mail/inbox/5" > $actual 2>&1
@@ -64,7 +64,7 @@ run_test 'mhlist 11' "mhlist: message 11 doesn't exist"
 
 # check multiple messages
 cat > $expected <<EOF
- msg part  type/subtype              size description                         
+ msg part  type/subtype              size description
    2       text/plain                  25
    8       text/plain                  25
 EOF
@@ -72,7 +72,7 @@ mhlist 2 8 > $actual 2>&1
 check $expected $actual
 
 # Write message with a text/plain subpart.
-msgfile=$(mhpath new)
+msgfile=`mhpath new`
 cat > $msgfile <<EOF
 To: recipient@example.com
 From: sender@example.com
@@ -172,6 +172,13 @@ run_test 'mhlist last -part 2 -noheader -check -nocheck' \
      1     multipart/related          180
      2     text/plain                  36'
 
+#
+# Set the cur sequence to 1 to test default behavior of changecur after
+# this test.
+#
+
+mark 1 -sequence cur -add -zero
+
 # check -verbose
 run_test 'mhlist 11 -verbose -noheader' \
 '  11       multipart/mixed            936
@@ -189,5 +196,18 @@ run_test 'mhlist 11 -verbose -noheader' \
      4     text/plain                  36
             charset="iso-8859-1"'
 
+#
+# Check default changecur behavior
+#
+
+run_test 'mark -sequence cur -list' 'cur: 11'
+
+#
+# Now test -nochangecur
+#
+
+mhlist -nochangecur 1 >/dev/null
+
+run_test 'mark -sequence cur -list' 'cur: 11'
 
 exit $failed