X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/fcadfe1323db62daea7b943b8a1e4e6a3c8640fa..f4cd66d90b8c81816b0999027ff401ef15973f86:/test/whatnow/test-attach-detach?ds=sidebyside diff --git a/test/whatnow/test-attach-detach b/test/whatnow/test-attach-detach index f674a4f5..a7b021f2 100755 --- a/test/whatnow/test-attach-detach +++ b/test/whatnow/test-attach-detach @@ -52,10 +52,12 @@ $testname detach $testname_quoted alist EOF +readline=1 ;; "") cat >"$expected" <"$expected" < [context]{attachment} ${MH_TEST_DIR}/Mail/context + +What now? whatnow: ingoring invalid attachformat value of 3 +#text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context + +What now? #text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context + +What now? #text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context + +What now? #text/plain; name="context"; x-unix-mode=0600 [ ASCII text ] ${MH_TEST_DIR}/Mail/context + +What now? +EOF +else cat >"$expected" < [context]{attachment} ${MH_TEST_DIR}/Mail/context +#text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context What now? at -v -a 3 Mail/context whatnow: ingoring invalid attachformat value of 3 -#text/plain; charset=us-ascii; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context +#text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context What now? at -v Mail/context -#text/plain; charset=us-ascii; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context +#text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context What now? at -v -a 1 Mail/context -#text/plain; charset=us-ascii; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context +#text/plain; name="context" <> [context]{attachment} ${MH_TEST_DIR}/Mail/context What now? at -v -a 0 Mail/context -#text/plain; charset=us-ascii; name="context"; x-unix-mode=0644 [ ASCII text ] ${MH_TEST_DIR}/Mail/context +#text/plain; name="context"; x-unix-mode=0600 [ ASCII text ] ${MH_TEST_DIR}/Mail/context What now? quit -delete EOF +fi + +# Don't depend on the mode of Mail/context: +chmod 0600 ${MH_TEST_DIR}/Mail/context + +if [ "$readline" = 0 ]; then + #### Ensure that there will be a newline at the end whatnow's output. + whatnowtest () { + whatnow; echo + } +else + whatnowtest () { + whatnow + } +fi set +e printf '%s\n' \ @@ -141,7 +194,9 @@ printf '%s\n' \ 'at -v Mail/context' \ 'at -v -a 1 Mail/context' \ 'at -v -a 0 Mail/context' \ -'quit -delete' | whatnow >$actual 2>&1 +'quit -delete' | whatnowtest 2>&1 | \ + sed -e 's/; charset=us-ascii//' -e 's/ *ASCII text/ ASCII text/' \ + -e 's/ *ascii text/ ASCII text/' >"$actual" set -e check "$expected" "$actual"