git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH 1/2] t4150: fix warning printed by awk due to escaped '\@'
Date: Mon, 07 Jul 2025 13:08:33 +0200	[thread overview]
Message-ID: <20250707-b4-pks-t-perlless-fixes-v1-1-92b2de1c3dd0@pks.im> (raw)
In-Reply-To: <20250707-b4-pks-t-perlless-fixes-v1-0-92b2de1c3dd0@pks.im>

In 6aec8d38fdd (t: refactor tests depending on Perl to print data,
2025-04-03) we have changed one of the tests in t4150 to use awk(1)
instead of Perl. The test works, but at least gawk(1) prints a warning
now:

    awk: cmd. line:3: warning: escape sequence `\@' treated as plain `@'

Fix this by removing the backslash.

Reported-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 t/t4150-am.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 2ae93d3c967..699a81ab5cc 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -1086,7 +1086,7 @@ test_expect_success 'am works with multi-line in-body headers' '
 	# bump from, date, and subject down to in-body header
 	awk "
 		/^From:/{
-			print \"From: x <x\@example.com>\";
+			print \"From: x <x@example.com>\";
 			print \"Date: Sat, 1 Jan 2000 00:00:00 +0000\";
 			print \"Subject: x\n\";
 		}; 1

-- 
2.50.0.195.g74e6fc65d0.dirty


  reply	other threads:[~2025-07-07 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07 11:08 [PATCH 0/2] t: fixes for Perl-less tests Patrick Steinhardt
2025-07-07 11:08 ` Patrick Steinhardt [this message]
2025-07-07 11:08 ` [PATCH 2/2] t5333: fix missing terminator for sed(1) 's' command Patrick Steinhardt
2025-07-07 16:15   ` Junio C Hamano
2025-07-08  6:44     ` Patrick Steinhardt

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=20250707-b4-pks-t-perlless-fixes-v1-1-92b2de1c3dd0@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder.dev@gmail.com \
    /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).