]> diplodocus.org Git - nmh/blobdiff - test/mhstore/test-mhstore
Reworded description of "mark -seq foo delete all" example
[nmh] / test / mhstore / test-mhstore
index 421580b26998062a2d3d9bb7738b9d04a5958f6d..d509abe55ff01fabf8692f709066740a99d9ba41 100755 (executable)
@@ -169,6 +169,14 @@ run_test 'mhstore last -part 4 -verbose -noverbose' \
   'storing message 11 part 4 as file 11.4.txt'
 check $expected 11.4.txt
 
+# check that -auto obeys Content-Disposition header
+cat > $expected <<EOF
+This is the first text/plain part, in a subpart.
+EOF
+run_test 'mhstore last -part 1.1 -auto' \
+  'storing message 11 part 1.1 as file test1.txt'
+check $expected test1.txt
+
 # check -check
 cat > $expected <<EOF
 This is the second text/plain part.
@@ -239,6 +247,9 @@ EOF
 run_test 'mhstore last' 'storing message 15 as file 15.txt'
 check $expected 15.txt
 
+# cd into Mail directory because it gets cleaned up by the exit trap.
+cd Mail
+
 # check -clobber always
 folder +inbox 7 > /dev/null
 touch 7.txt
@@ -247,7 +258,8 @@ This is message number 7
 EOF
 run_test 'mhstore' 'storing message 7 as file 7.txt'
 check $expected 7.txt 'keep first'
-run_test 'mhstore -clobber always' 'storing message 7 as file 7.txt'
+run_test 'mhstore -clobber ask -clobber always' \
+         'storing message 7 as file 7.txt'
 check $expected 7.txt 'keep first'
 
 # check -clobber auto
@@ -276,7 +288,7 @@ mhstore -clobber never >/dev/null 2>&1
 run_test "echo $?" 1
 set -e
 
-/bin/rm -f 7.txt 7-1.txt 7.txt.1
+cd ..
 
 # check with relative nmh-storage profile component
 storagedir=storagedir