git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 5/5] t/README: fix multi-prerequisite example

From
Štěpán Němec <stepnem@smrk.net>
Date
Oct 5, 2023, 09:00 UTC
Message-ID
<20231005090055.3097783-5-stepnem@smrk.net>
In-Reply-To
<20231005090055.3097783-1-stepnem@smrk.net>

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>
---
 t/README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/t/README b/t/README
index 2ef89785f831..a0ebe294848d 100644
--- 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>
 
-- 
2.42.0
Previous: Štěpán NěmecNext: Štěpán Němec
Message 15 of 20 in “Fix some typos, grammar or wording issues in the documentation”
  1. 1/5 Fix some typos, grammar or wording issues in the documentationŠtěpán Němec, Oct 3, 2023
  2. 2/5 doc/diff-options: improve wording of the log.diffMerges mentionŠtěpán Němec, Oct 3, 2023
  3. 3/5 git-jump: admit to passing merge mode args to ls-filesŠtěpán Němec, Oct 3, 2023
  4. Eric SunshineOct 3, 2023
  5. Štěpán NěmecOct 3, 2023
  6. Junio C HamanoOct 3, 2023
  7. Junio C HamanoOct 3, 2023
  8. 4/5 doc/gitk: s/sticked/stuck/Štěpán Němec, Oct 3, 2023
  9. 5/5 t/README: fix multi-prerequisite exampleŠtěpán Němec, Oct 3, 2023
  10. Eric SunshineOct 3, 2023
  11. Štěpán NěmecOct 3, 2023
  12. Junio C HamanoOct 3, 2023
  13. Eric SunshineOct 3, 2023
  14. 1/5 doc: fix some typos, grammar and wording issuesŠtěpán Němec, Oct 5, 2023
  15. 5/5 t/README: fix multi-prerequisite exampleŠtěpán Němec, Oct 5, 2023
  16. 3/5 git-jump: admit to passing merge mode args to ls-filesŠtěpán Němec, Oct 5, 2023
  17. 2/5 doc/diff-options: improve wording of the log.diffMerges mentionŠtěpán Němec, Oct 5, 2023
  18. 4/5 doc/gitk: s/sticked/stuck/Štěpán Němec, Oct 5, 2023
  19. Junio C HamanoOct 5, 2023
  20. Junio C HamanoOct 18, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.