mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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>
This commit is contained in:
parent
5acc5bfd63
commit
8e832ebce6
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue