tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / tap-planskip-unplanned.sh
old mode 100755 (executable)
new mode 100644 (file)
index 6ea3f05..f48585c
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -27,8 +27,7 @@ cat > all.test <<END
 ok 1
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=2 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
 
@@ -38,8 +37,7 @@ ok 2 # SKIP
 not ok 3 # TODO
 1..0 # SKIP too late
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=4 pass=1 fail=0 xpass=0 xfail=1 skip=1 error=1
 grep '^ERROR: all\.test - too many tests run (expected 0, got 3)$' stdout
 
@@ -47,8 +45,7 @@ cat > all.test <<END
 1..0 # SKIP falsified later
 ok 1
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=3 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=2
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test - too many tests run (expected 0, got 1)$' stdout
@@ -60,8 +57,7 @@ ok 2 # SKIP
 not ok 3
 not ok 4 # TODO
 END
-$MAKE check >stdout && { cat stdout; exit 1; }
-cat stdout
+run_make -O -e FAIL check
 count_test_results total=6 pass=0 fail=0 xpass=0 xfail=0 skip=1 error=5
 grep '^ERROR: all\.test 1 # UNPLANNED$' stdout
 grep '^ERROR: all\.test 2 # UNPLANNED$' stdout