Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
String comparison of test is done with '=', not '=='.
author
Junio C Hamano
<junkio@cox.net>
Thu, 11 Aug 2005 05:53:27 +0000
(22:53 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 12 Aug 2005 01:26:14 +0000
(18:26 -0700)
Caught this during a test setting /bin/sh to (d)ash.
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/test-lib.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
5acc5bf
)
diff --git
a/t/test-lib.sh
b/t/test-lib.sh
index f97f8eb395299f17873f6e6587db235e583cb45e..e62bd0408ca217f1423801258b0244db6984ea77 100755
(executable)
--- a/
t/test-lib.sh
+++ b/
t/test-lib.sh
@@
-87,16
+87,16
@@
test_failure_ () {
say "FAIL $test_count: $1"
shift
echo "$@" | sed -e 's/^/ /'
say "FAIL $test_count: $1"
shift
echo "$@" | sed -e 's/^/ /'
- test "$immediate" =
=
"" || exit 1
+ test "$immediate" = "" || exit 1
}
test_debug () {
}
test_debug () {
- test "$debug" =
=
"" || eval "$1"
+ test "$debug" = "" || eval "$1"
}
test_expect_failure () {
}
test_expect_failure () {
- test "$#" =
=
2 ||
+ test "$#" = 2 ||
error "bug in the test script: not 2 parameters to test-expect-failure"
say >&3 "expecting failure: $2"
if eval >&3 2>&4 "$2"
error "bug in the test script: not 2 parameters to test-expect-failure"
say >&3 "expecting failure: $2"
if eval >&3 2>&4 "$2"
@@
-108,7
+108,7
@@
test_expect_failure () {
}
test_expect_success () {
}
test_expect_success () {
- test "$#" =
=
2 ||
+ test "$#" = 2 ||
error "bug in the test script: not 2 parameters to test-expect-success"
say >&3 "expecting success: $2"
if eval >&3 2>&4 "$2"
error "bug in the test script: not 2 parameters to test-expect-success"
say >&3 "expecting success: $2"
if eval >&3 2>&4 "$2"