>From 75358282c6674d399e76c42eb456ed20b73c358a Mon Sep 17 00:00:00 2001 From: Peter Rosin <p...@lysator.liu.se> Date: Fri, 17 Sep 2010 12:15:00 +0200 Subject: [PATCH 1/2] * tests/sh.test: Detect missing 'test' in 'if "$foo" = ...'.
Signed-off-by: Peter Rosin <p...@lysator.liu.se> --- ChangeLog | 4 ++++ tests/sh.test | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 37f6c84..a6f7d42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-09-17 Peter Rosin <p...@lysator.liu.se> + + * tests/sh.test: Detect missing 'test' in 'if "$foo" = ...'. + 2010-09-16 Ralf Wildenhues <ralf.wildenh...@gmx.de> tests: avoid localization failure due to unstable compiler messages. diff --git a/tests/sh.test b/tests/sh.test index 6d2fa20..5324b31 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -2,8 +2,8 @@ # sh.test - check for some nonportable or dubious or undesired shell # constructs in shell scripts. # -# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software -# Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2010 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2003 # # This file is part of GNU Libtool. @@ -31,7 +31,7 @@ status=$EXIT_SUCCESS # Check for bad binary operators. -if $EGREP -n -e 'if[ ]+["'\'']?\\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then +if $EGREP -n -e 'if[ ]+["'\'']?\$[^ ]+[ ]+(=|-[lg][te]|-eq|-ne)' $scripts; then echo "use \`if test \$something =' instead of \`if \$something ='" status=$EXIT_FAILURE fi -- 1.7.1