From: Ralph Corderoy Date: Sat, 20 Jan 2018 11:38:24 +0000 (+0000) Subject: test: Send command's stderr down pipe; don't discard. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/025963d5fe8ca0781eee8c83c23b4ea1209a3b0b?ds=inline;hp=5303e0f65b71e1336944a5b10356d6a99528511a test: Send command's stderr down pipe; don't discard. Fixes 880ff2a4 that turned `foo >$actual 2>&1' into `foo | sed ... >$actual 2>&1'. --- diff --git a/test/ali/test-ali b/test/ali/test-ali index 019f329a..dad6c700 100755 --- a/test/ali/test-ali +++ b/test/ali/test-ali @@ -45,7 +45,7 @@ Usage: ali [switches] aliases ... EOF #### Skip nmh intro text. -ali -help | sed '/^$/,$d' >"$actual" 2>&1 +ali -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/anno/test-anno b/test/anno/test-anno index 89204ccb..008c3419 100755 --- a/test/anno/test-anno +++ b/test/anno/test-anno @@ -59,7 +59,7 @@ Usage: anno [+folder] [msgs] [switches] EOF #### Skip nmh intro text. -run_prog anno -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog anno -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/dist/test-dist b/test/dist/test-dist index 496986f5..d3f6279e 100755 --- a/test/dist/test-dist +++ b/test/dist/test-dist @@ -94,7 +94,7 @@ Usage: dist [+folder] [msg] [switches] EOF #### Skip nmh intro text. -dist -help | sed '/^$/,$d' >"$actual" 2>&1 +dist -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/folder/test-packf b/test/folder/test-packf index a839dc8e..1db6965c 100755 --- a/test/folder/test-packf +++ b/test/folder/test-packf @@ -34,7 +34,7 @@ Usage: packf [+folder] [msgs] [switches] EOF #### Skip nmh intro text. -packf -help | sed '/^$/,$d' >"$actual" 2>&1 +packf -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/folder/test-sortm b/test/folder/test-sortm index a136faaa..491bf5cf 100755 --- a/test/folder/test-sortm +++ b/test/folder/test-sortm @@ -40,7 +40,7 @@ Usage: sortm [+folder] [msgs] [switches] EOF #### Skip nmh intro text. -run_prog sortm -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog sortm -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/format/test-dp b/test/format/test-dp index 7805d0bf..09d47f8c 100755 --- a/test/format/test-dp +++ b/test/format/test-dp @@ -48,7 +48,7 @@ Usage: dp [switches] dates ... EOF #### Skip nmh intro text. -run_prog "$dp" -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog "$dp" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/format/test-fmtdump b/test/format/test-fmtdump index 82791f48..0e723dce 100755 --- a/test/format/test-fmtdump +++ b/test/format/test-fmtdump @@ -59,7 +59,7 @@ Usage: fmtdump [switches] EOF #### Skip nmh intro text. -"$fmtdump" -help | sed '/^$/,$d' >"$actual" 2>&1 +"$fmtdump" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/mhfixmsg/test-mhfixmsg b/test/mhfixmsg/test-mhfixmsg index b927b95e..138c5051 100755 --- a/test/mhfixmsg/test-mhfixmsg +++ b/test/mhfixmsg/test-mhfixmsg @@ -73,7 +73,7 @@ Usage: mhfixmsg [+folder] [msgs] [switches] EOF #### Skip nmh intro text. -run_prog mhfixmsg -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog mhfixmsg -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" diff --git a/test/mhical/test-mhical b/test/mhical/test-mhical index ad51b09c..72c55f5d 100755 --- a/test/mhical/test-mhical +++ b/test/mhical/test-mhical @@ -49,7 +49,7 @@ Usage: mhical [switches] EOF #### Skip nmh intro text. -run_prog mhical -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog mhical -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 2e7375f0..cd85b95c 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -89,7 +89,7 @@ Usage: mhmail [-t(o)] addrs ... [switches] EOF #### Skip nmh intro text. -mhmail -help | sed '/^$/,$d' >"$actual" 2>&1 +mhmail -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" diff --git a/test/mhparam/test-mhparam b/test/mhparam/test-mhparam index b532183d..1470cbaa 100755 --- a/test/mhparam/test-mhparam +++ b/test/mhparam/test-mhparam @@ -38,7 +38,7 @@ Usage: mhparam [profile-components] [switches] EOF #### Skip nmh intro text. -mhparam -help | sed '/^$/,$d' >"$actual" 2>&1 +mhparam -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/mhpath/test-mhpath b/test/mhpath/test-mhpath index e7209ce3..c6521ce3 100755 --- a/test/mhpath/test-mhpath +++ b/test/mhpath/test-mhpath @@ -31,7 +31,7 @@ Usage: mhpath [+folder] [msgs] [switches] EOF #### Skip nmh intro text. -run_prog mhpath -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog mhpath -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/mkstemp/test-mkstemp b/test/mkstemp/test-mkstemp index 8e0eb830..2ff99f22 100755 --- a/test/mkstemp/test-mkstemp +++ b/test/mkstemp/test-mkstemp @@ -51,7 +51,7 @@ else fi #### Skip nmh intro text. -run_prog $mkstemp -h | sed '/^$/,$d' >"$actual" 2>&1 +run_prog $mkstemp -h 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" diff --git a/test/post/test-sendfiles b/test/post/test-sendfiles index 3e55b1ec..bc93c313 100755 --- a/test/post/test-sendfiles +++ b/test/post/test-sendfiles @@ -90,7 +90,7 @@ Usage: sendfiles [switches] -to recipient -subject subject file1 [file2 ...] EOF #### Skip nmh intro text. -run_prog sendfiles -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog sendfiles -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/prompter/test-prompter b/test/prompter/test-prompter index 65ed8a96..43739b74 100755 --- a/test/prompter/test-prompter +++ b/test/prompter/test-prompter @@ -38,7 +38,7 @@ Usage: prompter [switches] file EOF #### Skip nmh intro text. -run_prog prompter -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog prompter -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/rcv/test-rcvdist b/test/rcv/test-rcvdist index 7ac0087c..bdc32f76 100755 --- a/test/rcv/test-rcvdist +++ b/test/rcv/test-rcvdist @@ -40,7 +40,7 @@ Usage: rcvdist [switches] [switches for postproc] address ... EOF #### Skip nmh intro text. -run_prog "$rcvdist" -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog "$rcvdist" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/rcv/test-rcvpack b/test/rcv/test-rcvpack index a780c253..ebae2286 100755 --- a/test/rcv/test-rcvpack +++ b/test/rcv/test-rcvpack @@ -36,7 +36,7 @@ Usage: rcvpack [switches] file EOF #### Skip nmh intro text. -run_prog "$rcvpack" -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog "$rcvpack" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/rcv/test-rcvstore b/test/rcv/test-rcvstore index 48bf8c1b..d2844df0 100755 --- a/test/rcv/test-rcvstore +++ b/test/rcv/test-rcvstore @@ -41,7 +41,7 @@ Usage: rcvstore [+folder] [switches] EOF #### Skip nmh intro text. -run_prog "$rcvstore" -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog "$rcvstore" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/rcv/test-rcvtty b/test/rcv/test-rcvtty index a2cf6ca6..fdc74d44 100755 --- a/test/rcv/test-rcvtty +++ b/test/rcv/test-rcvtty @@ -40,7 +40,7 @@ Usage: rcvtty [command ...] EOF #### Skip nmh intro text. -run_prog "$rcvtty" -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog "$rcvtty" -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/repl/test-repl b/test/repl/test-repl index c406b009..2e5bef2c 100755 --- a/test/repl/test-repl +++ b/test/repl/test-repl @@ -59,7 +59,7 @@ Usage: repl: [+folder] [msg] [switches] EOF #### Skip nmh intro text. -run_prog repl -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog repl -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version diff --git a/test/slocal/test-slocal b/test/slocal/test-slocal index 1213117b..8eaa2255 100755 --- a/test/slocal/test-slocal +++ b/test/slocal/test-slocal @@ -45,7 +45,7 @@ Usage: slocal [switches] EOF #### Skip nmh intro text. -run_prog $slocal -help | sed '/^$/,$d' >"$actual" 2>&1 +run_prog $slocal -help 2>&1 | sed '/^$/,$d' >"$actual" check "$expected" "$actual" # check -version