libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] * tests/sh.test: Detect missing 'test' in 'if "$foo" = ...'.


From: Peter Rosin
Subject: [PATCH 1/2] * tests/sh.test: Detect missing 'test' in 'if "$foo" = ...'.
Date: Fri, 17 Sep 2010 12:37:07 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2

>From 75358282c6674d399e76c42eb456ed20b73c358a Mon Sep 17 00:00:00 2001
From: Peter Rosin <address@hidden>
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 <address@hidden>
---
 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  <address@hidden>
+
+       * tests/sh.test: Detect missing 'test' in 'if "$foo" = ...'.
+
 2010-09-16  Ralf Wildenhues  <address@hidden>
 
        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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]