]> diplodocus.org Git - nmh/blobdiff - test/pick/test-stderr
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / test / pick / test-stderr
index f3212da114ab1e8dcf2aee48946251bd0760de74..76b899d34e5fa2e9cd4a763591fc5a290918ef4d 100755 (executable)
@@ -5,11 +5,12 @@
 #
 ######################################################
 
-if [ -z "${MH_TEST_COMMON}" ]; then
-    echo "MH_TEST_COMMON not set; try running via 'make check'"
+if test -z "${MH_OBJ_DIR}"; then
+    srcdir=`dirname "$0"`/../..
+    MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
 fi
 
-. ${MH_TEST_COMMON}
+. "$MH_OBJ_DIR/test/common.sh"
 
 setup_test
 
@@ -27,6 +28,6 @@ EOF
 # Nothing should to go stdout.
 cat /dev/null > $expected_out
 
-pick -a > $actual_out 2> $actual_err
-diff -u $expected_err $actual_err || exit 1
-diff -u $expected_out $actual_out || exit 1
+run_prog pick -a > $actual_out 2> $actual_err  ||  true
+check "$expected_err" "$actual_err"
+check "$expected_out" "$actual_out"