test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / tap-bad-prog.tap
old mode 100755 (executable)
new mode 100644 (file)
index e37f18c..490cd4a
@@ -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
@@ -49,13 +49,8 @@ $AUTOMAKE
 
 ./configure
 
-if $MAKE check >stdout; then
-  r='not ok'
-else
-  r='ok'
-fi
-cat stdout
-result_ "$r" '"make check" returns non-zero exit status'
+command_ok_ '"make check" returns non-zero exit status' \
+            run_make -O -e FAIL check
 
 # FIXME: maybe grep for stricter error messages in the next checks?