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 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
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
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
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