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

[PATCH 1/2] t4150: fix warning printed by awk due to escaped '\@'

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 7, 2025, 11:08 UTC
Message-ID
<20250707-b4-pks-t-perlless-fixes-v1-1-92b2de1c3dd0@pks.im>
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
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 2 of 5 in “t: fixes for Perl-less tests”
  1. 0/2 t: fixes for Perl-less testsPatrick Steinhardt, Jul 7, 2025
  2. 1/2 t4150: fix warning printed by awk due to escaped '\@'Patrick Steinhardt, Jul 7, 2025
  3. 2/2 t5333: fix missing terminator for sed(1) 's' commandPatrick Steinhardt, Jul 7, 2025
  4. Junio C HamanoJul 7, 2025
  5. Patrick SteinhardtJul 8, 2025

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.