From 92d9818d7eb8ca4bb1bc775cd397255beb2481d8 Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Fri, 17 Sep 2010 22:31:08 +0200 Subject: [PATCH] tests: actually detect missing 'test' in 'if "$foo" = ...'. * tests/sh.test: Remove extra backslash in regex. Signed-off-by: Peter Rosin --- ChangeLog | 3 +++ tests/sh.test | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 514a20e72..e6984aebb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-09-17 Peter Rosin + tests: actually detect missing 'test' in 'if "$foo" = ...'. + * tests/sh.test: Remove extra backslash in regex. + Copy over DLL_EXPORT handling from C to C++ for non-GCC on w32. * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [mingw, cygwin, os2] [pw32, cegcc]: Copy over the DLL_EXPORT handling from C to C++. diff --git a/tests/sh.test b/tests/sh.test index 6d2fa2073..5324b318d 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 -- 2.47.2