Add tests for pick
[mmh] / test / tests / pick / test-normal-output
diff --git a/test/tests/pick/test-normal-output b/test/tests/pick/test-normal-output
new file mode 100644 (file)
index 0000000..bd1a2e7
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+######################################################
+#
+# Test that all messages are picked and no ``0'' is giving out.
+#
+######################################################
+
+expected_err=$MH_TEST_DIR/$$.expected_err
+expected_out=$MH_TEST_DIR/$$.expected_out
+actual_err=$MH_TEST_DIR/$$.actual_err
+actual_out=$MH_TEST_DIR/$$.actual_out
+
+# All messages should be go to stdout
+cat > $expected_out <<EOF
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+EOF
+# Nothing should to go stderr
+cat /dev/null > $expected_err
+
+pick > $actual_out 2> $actual_err
+diff -u $expected_err $actual_err
+diff -u $expected_out $actual_out