The enclosed patch improves the test coverage of "scan", enhancing the test I wrote last year.
< Stephen
commit 23d5c90f38d573f3e88d08e09489ada3f731ef7a Author: Stephen Gildea <[email protected]> Date: Thu Feb 18 18:57:12 2021 -0800 test-scan-file: test that scanning file "-" reads from stdin diff --git a/test/scan/test-scan-file b/test/scan/test-scan-file index daf3f3fb..8a53f56f 100755 --- a/test/scan/test-scan-file +++ b/test/scan/test-scan-file @@ -46,6 +46,13 @@ start_test 'scan file' run_prog scan -file "$MH_TEST_DIR/spoolfile" -width 80 >"$actual" || exit 1 check "$expected" "$actual" 'keep first' +## Test that scanning file "-" reads from stdin + +start_test 'scan file stdin' + +run_prog scan -file - <"$MH_TEST_DIR/spoolfile" -width 80 >"$actual" || exit 1 +check "$expected" "$actual" 'keep first' + test -z "$MH_TEST_NOCLEANUP" && rm -f "$MH_TEST_DIR/spoolfile" ## Convert the test inbox folder into a Maildir directory
