git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rubén Justo" <rjusto@gmail.com>
To: Git List <git@vger.kernel.org>
Subject: [PATCH 5/5] t4124: move test preparation into the test context
Date: Sun, 25 Aug 2024 12:19:48 +0200	[thread overview]
Message-ID: <4c0c05a2-c143-43b4-bc1b-d70b3645c702@gmail.com> (raw)
In-Reply-To: <6dd964c2-9dee-4257-8f1a-5bc31a73722e@gmail.com>

Signed-off-by: Rubén Justo <rjusto@gmail.com>
---
 t/t4124-apply-ws-rule.sh | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh
index e12b8333c3..56f15dc3ef 100755
--- a/t/t4124-apply-ws-rule.sh
+++ b/t/t4124-apply-ws-rule.sh
@@ -423,14 +423,8 @@ test_expect_success 'missing blanks at EOF must only match blank lines' '
 	test_must_fail git apply --ignore-space-change --whitespace=fix patch
 '
 
-sed -e's/Z//' >one <<EOF
-a
-b
-c
-		      Z
-EOF
-
 test_expect_success 'missing blank line should match context line with spaces' '
+	test_write_lines a b c "		      " >one &&
 	git add one &&
 	echo d >>one &&
 	git diff -- one >patch &&
@@ -443,14 +437,8 @@ test_expect_success 'missing blank line should match context line with spaces' '
 	test_cmp expect one
 '
 
-sed -e's/Z//' >one <<EOF
-a
-b
-c
-		      Z
-EOF
-
 test_expect_success 'same, but with the --ignore-space-option' '
+	test_write_lines a b c "		      " >one &&
 	git add one &&
 	echo d >>one &&
 	cp one expect &&
-- 
2.46.0.353.g385c909849

      parent reply	other threads:[~2024-08-25 10:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-25 10:09 [PATCH 0/5] `--whitespace=fix` with `--no-ignore-whitespace` Rubén Justo
2024-08-25 10:17 ` [PATCH 1/5] apply: introduce `ignore_ws_default` Rubén Justo
2024-08-27  1:11   ` Junio C Hamano
2024-08-25 10:18 ` [PATCH 2/5] apply: honor `ignore_ws_none` with `correct_ws_error` Rubén Justo
2024-08-27  0:35   ` Junio C Hamano
2024-08-29  5:07     ` Rubén Justo
2024-08-29 23:13       ` Junio C Hamano
2024-09-03 22:06         ` Rubén Justo
2024-09-04  4:41           ` Junio C Hamano
2024-09-04 18:20             ` Rubén Justo
2024-08-25 10:18 ` [PATCH 3/5] apply: whitespace errors in context lines if we have Rubén Justo
2024-08-27  0:43   ` Junio C Hamano
2024-08-27  1:49     ` Junio C Hamano
2024-08-27 16:12       ` Junio C Hamano
2024-08-27  0:51   ` Junio C Hamano
2024-08-25 10:19 ` [PATCH 4/5] apply: error message in `record_ws_error()` Rubén Justo
2024-08-27  0:44   ` Junio C Hamano
2024-08-25 10:19 ` Rubén Justo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c0c05a2-c143-43b4-bc1b-d70b3645c702@gmail.com \
    --to=rjusto@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).