[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] allow unquoted "test $?"
From: |
Paolo Bonzini |
Subject: |
[PATCH] allow unquoted "test $?" |
Date: |
Thu, 31 Jul 2008 13:43:18 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (Macintosh/20080707) |
With git libtool, sh.test is failing. Either the offending line should
be fixed, or the attached patch to sh.test should be applied to allow
not quoting $?.
Thanks!
Paolo
2008-07-31 Paolo Bonzini <address@hidden>
* tests/sh.test: Allow unquoted "test $?"
diff --git a/tests/sh.test b/tests/sh.test
index 6d2fa20..ac13772 100755
--- a/tests/sh.test
+++ b/tests/sh.test
@@ -55,7 +55,8 @@ if $EGREP -n -e 'test[ ]+(![ ])?(-.[
]+)?X' $scrip
fi
# Check for using test $... instead of test "$...
-if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$'
$scripts; then
+# Make an exception for $? though
+if $EGREP -n -e 'test[ ]+(![ ])?(-.[ ]+)?X?\$[^?]'
$scripts; then
echo "use \`test \"\$...\"' instead of \`test \$'"
status=$EXIT_FAILURE
fi
- [PATCH] allow unquoted "test $?",
Paolo Bonzini <=