Skip to content

t7800: fix quoting of looped test bodies

Patrick Steinhardt git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Fixed indentation of a paragraph in "t/README".

- Added a clarification why one wants to use single quotes to "t/README".

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3t7800: improve test descriptions with empty argumentst/t7800-difftool.sh+8 -80 replies
2/3t7800: use single quotes for test bodiest/t7800-difftool.sh+20 -200 replies
3/3t/README: document how to loop around test casest/README+20 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] t7800: fix quoting of looped test bodies

Hi,

this is the second version of my patch series that aims to address some issues with looping around test_expect_success in t7800.

Changes compared to v1:

- Fixed indentation of a paragraph in "t/README".

- Added a clarification why one wants to use single quotes to "t/README".

Thanks!

Patrick

Patrick Steinhardt (3):
t7800: improve test descriptions with empty arguments
t7800: use single quotes for test bodies t/README: document how to loop around test cases

 t/README            | 20 ++++++++++++++++++++
 t/t7800-difftool.sh | 40 ++++++++++++++++++++--------------------
 2 files changed, 40 insertions(+), 20 deletions(-)

Range-diff against v1:

1:  fd37c29319 = 1:  fd37c29319 t7800: improve test descriptions with empty arguments
2:  a4ca974397 = 2:  a4ca974397 t7800: use single quotes for test bodies
3:  326fb79650 ! 3:  f83b710208 t/README: document how to loop around test cases

@@ t/README: The "do's:"
+ '
+ done
+
-+ Note that while the test title uses double quotes ("), the test body -+ should continue to use single quotes ('). The loop variable will be -+ accessible regardless of the single quotes as the test body is passed -+ to eval.
++ Note that while the test title uses double quotes ("), the test body
++ should continue to use single quotes (') to avoid breakage in case the
++ values contain e.g. quoting characters. The loop variable will be
++ accessible regardless of the single quotes as the test body is passed
++ to eval.
+

And here are the "don'ts:"

Signature · 1 line
2.44.0