]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/sh.test: Add a new test to enforce X as the fill
authorGary V. Vaughan <gary@gnu.org>
Sun, 29 Jul 2001 16:35:50 +0000 (16:35 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 29 Jul 2001 16:35:50 +0000 (16:35 +0000)
character in `test "X...'.
Beef up the `test' tests to also check `test -.' and `test ! -.'
phrases for compliance.
* ltmain.in: Fix quoting problems uncovered by the new tests.

ChangeLog
ltmain.in
tests/sh.test

index 844f1a568b25d918f671f1e285f3d78f5f028368..1ac14ee3e5e894a56dbe146c32a4b6678d2df782 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-07-29  Gary V. Vaughan  <gary@gnu.org>
+
+       * tests/sh.test: Add a new test to enforce X as the fill
+       character in `test "X...'.
+       Beef up the `test' tests to also check `test -.' and `test ! -.'
+       phrases for compliance.
+       * ltmain.in: Fix quoting problems uncovered by the new tests.
+
 2001-07-29  Andrew C. Feren  <aferen@CetaceanNetworks.com>
 
        * tests/sh.test:  New test to disallow `test $foo', where
index 784c06ee404d5153469ba10e052088056d325114..1bb891c69e493d46307a01af213defb3a552a525 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -681,7 +681,7 @@ compiler."
       fi
 
       # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
        $show "$mv $output_obj $lobj"
        if $run $mv $output_obj $lobj; then :
        else
@@ -751,7 +751,7 @@ compiler."
       fi
 
       # Just move the object if needed
-      if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
        $show "$mv $output_obj $obj"
        if $run $mv $output_obj $obj; then :
        else
index 66b5e9c33fed8cc7714cc122c8c705a34a8663df..8d3997538f1b6ff3a9f04444b74f34fb90108671 100755 (executable)
@@ -32,20 +32,25 @@ if egrep -n -e 'if[         ]+\[' $scripts; then
   status=1
 fi
 
+if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?"?[.,_x]' $scripts; then
+  echo "use \`test \"X...\"' instead of \`test \"x...\"'"
+  status=1
+fi
+
 # Check for using test X... instead of test "X...
-if egrep -n -e 'test[  ]+X' $scripts; then
+if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?X' $scripts; then
   echo "use \`test \"X...\"' instead of \`test X'"
   status=1
 fi
 
 # Check for using test $... instead of test "$...
-if egrep -n -e 'test[  ]+(-.[  ]+)?X?\$' $scripts; then
+if egrep -n -e 'test[  ]+(![   ])?(-.[         ]+)?X?\$' $scripts; then
   echo "use \`test \"\$...\"' instead of \`test \$'"
   status=1
 fi
 
 # Never use test -e.
-if egrep -n -e 'test[  ]+-e' $scripts; then
+if egrep -n -e 'test[  ]+(![   ])?-e' $scripts; then
   echo "use \`test -f' instead of \`test -e'"
   status=1
 fi