summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-11 05:53:27 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-08-12 01:26:14 (GMT)
commit8e832ebce61e6b82c7187365cbf12b2ef614c188 (patch)
treef241452ed86e50c8378acf808f4043c894712950
parent5acc5bfd6303f1fec4b3d175a15a2ff800983be7 (diff)
downloadgit-8e832ebce61e6b82c7187365cbf12b2ef614c188.zip
git-8e832ebce61e6b82c7187365cbf12b2ef614c188.tar.gz
git-8e832ebce61e6b82c7187365cbf12b2ef614c188.tar.bz2
String comparison of test is done with '=', not '=='.
Caught this during a test setting /bin/sh to (d)ash. Signed-off-by: Junio C Hamano <junkio@cox.net>
-rwxr-xr-xt/test-lib.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f97f8eb..e62bd04 100755
--- 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/^/ /'
- test "$immediate" == "" || exit 1
+ test "$immediate" = "" || exit 1
}
test_debug () {
- test "$debug" == "" || eval "$1"
+ test "$debug" = "" || eval "$1"
}
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"
@@ -108,7 +108,7 @@ test_expect_failure () {
}
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"