mhparam: Added more items for direct query and -debug listing.
[mmh] / test / tests / pick / test-stderr
1 #!/bin/sh
2 ######################################################
3 #
4 # Test that errors are not written to stdout.
5 #
6 ######################################################
7
8 expected_err=$MH_TEST_DIR/$$.expected_err
9 expected_out=$MH_TEST_DIR/$$.expected_out
10 actual_err=$MH_TEST_DIR/$$.actual_err
11 actual_out=$MH_TEST_DIR/$$.actual_out
12
13 # Error message should go to stderr.
14 cat > $expected_err <<EOF
15 pick: -a ambiguous.  It matches
16   -and
17   -after date
18 EOF
19 # Nothing should to go stdout.
20 cat /dev/null > $expected_out
21
22 pick -a > $actual_out 2> $actual_err
23 diff -u $expected_err $actual_err
24 diff -u $expected_out $actual_out