]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t4150: fix warning printed by awk due to escaped '\@'
authorPatrick Steinhardt <ps@pks.im>
Mon, 7 Jul 2025 11:08:33 +0000 (13:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Jul 2025 16:12:43 +0000 (09:12 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4150-am.sh

index 2ae93d3c967aad18cad7290d09a9e7323637c0c2..699a81ab5cc6d2ebb4c035be238006860ab1673a 100755 (executable)
@@ -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