Another simple patch aimed at making the Automake test scripts use 
`set -e' more consistently.
-*-*-

Make badopt.test stricter (by enabling `set -e').

* tests/badopt.test: Add call to `set -e'.  Due to this change,
an unexpected failure in the call to `$ACLOCAL' (whose outcome 
was previously unchecked) would cause the whole test to fail.  
Also, bumped the copyright years.

-*-*-

No portability problems should be introduced, since the test script
uses only simple commands and a call to the `AUTOMAKE_fails' shell
function, which calls `Exit 1' on unexpected $AUTOMAKE success
(thus avoiding the possibility of false negatives), and returns
with a status of `0' otherwise (thus avoiding the possibility of
false positives).
From 64842626c8ac06e268bf4b9a644a021dee6461d8 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <stefano.lattar...@gmail.com>
Date: Thu, 8 Apr 2010 17:40:02 +0200
Subject: [PATCH] Make badopt.test stricter (by enabling `set -e').

* tests/badopt.test: Add call to `set -e'.  Due to this change,
an unexpected failure in the call to `$ACLOCAL' (whose outcome
was previously unchecked) would cause the whole test to fail.
Also, bumped the copyright years.
---
 ChangeLog         |    9 +++++++++
 tests/badopt.test |    8 ++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a026c84..70d3709 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-20  Stefano Lattarini  <stefano.lattar...@gmail.com>
+
+	Make test badopt.test stricter (by enabling `set -e').
+
+	* tests/badopt.test: Add call to `set -e'.  Due to this change,
+	an unexpected failure in the call to `$ACLOCAL' (whose outcome
+	was previously unchecked) would cause the whole test to fail.
+	Also, bumped the copyright years.
+
 2010-04-20  Ralf Wildenhues  <ralf.wildenh...@gmx.de>
 
 	Fix -Werror handling for presence of configure.in and configure.ac.
diff --git a/tests/badopt.test b/tests/badopt.test
index 59eb5fa..2da53e9 100755
--- a/tests/badopt.test
+++ b/tests/badopt.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2002, 2003, 2010 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
@@ -18,9 +18,9 @@
 
 . ./defs || Exit 1
 
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = zardoz
-END
+set -e
+
+echo 'AUTOMAKE_OPTIONS = zardoz' > Makefile.am
 
 $ACLOCAL
 AUTOMAKE_fails
-- 
1.6.5

Reply via email to