]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/README: fix multi-prerequisite example
authorŠtěpán Němec <stepnem@smrk.net>
Thu, 5 Oct 2023 09:00:55 +0000 (11:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Oct 2023 19:55:38 +0000 (12:55 -0700)
With the broken quoting the test wouldn't even parse correctly, but
there's also the '==' instead of POSIX '=' (of the shells I tested,
busybox ash, bash and ksh (93 and OpenBSD) accept '==', dash and zsh do
not), and 'print 2' from Python 2 days.

(I assume the test failing due to 3 != 4 is intentional or immaterial.)

Fixes: 93a572461386 ("test-lib: Add support for multiple test prerequisites")
Signed-off-by: Štěpán Němec <stepnem@smrk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README

index 2ef89785f8310a68e5f7c515dbd71af87176d8e3..a0ebe294848ddc3ea6abdd7b9308edce34f7a876 100644 (file)
--- a/t/README
+++ b/t/README
@@ -887,7 +887,7 @@ see test-lib-functions.sh for the full list and their options.
    rare case where your test depends on more than one:
 
        test_expect_success PERL,PYTHON 'yo dawg' \
-           ' test $(perl -E 'print eval "1 +" . qx[python -c "print 2"]') == "4" '
+           ' test $(perl -E '\''print eval "1 +" . qx[python -c "print(2)"]'\'') = "4" '
 
  - test_expect_failure [<prereq>] <message> <script>