'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.
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
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
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