aboutsummaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-04-03 15:24:45 -0700
committerJunio C Hamano <gitster@pobox.com>2026-04-03 15:24:45 -0700
commitdc9afb66cf013dd8f80dfeffb595de1f27ef7a89 (patch)
tree6207a41a61ca2a502bdb8f5423e2b59a45ddac2b /t/t4014-format-patch.sh
parentac340a635dc8f338ee4ad6a6f74c974cdcda7217 (diff)
parentd48c5d5a4c801dfe9acd5dc4a3c1b94430883f52 (diff)
downloadgit-dc9afb66cf013dd8f80dfeffb595de1f27ef7a89.tar.xz
Merge branch 'ps/dash-buggy-0.5.13-workaround'
The way dash 0.5.13 handles non-ASCII contents in here-doc is buggy and breaks our existing tests, which unfortunately have been rewritten to avoid triggering the bug. * ps/dash-buggy-0.5.13-workaround: t9300: work around partial read bug in Dash v0.5.13 t: work around multibyte bug in quoted heredocs with Dash v0.5.13
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 7517094bd6..0b89d127b5 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1410,7 +1410,9 @@ test_expect_success 'format-patch wraps extremely long from-header (rfc2047)' '
check_author "Foö Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar"
'
-cat >expect <<'EOF'
+# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
+# that contain multibyte chars.
+cat >expect <<EOF
From: Foö Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar
Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo Bar Foo
Bar Foo Bar Foo Bar Foo Bar <author@example.com>
@@ -1425,7 +1427,9 @@ test_expect_success 'format-patch wraps extremely long from-header (non-ASCII wi
test_cmp expect actual
'
-cat >expect <<'EOF'
+# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
+# that contain multibyte chars.
+cat >expect <<EOF
Subject: [PATCH] Foö
EOF
test_expect_success 'subject lines are unencoded with --no-encode-email-headers' '
@@ -1437,7 +1441,9 @@ test_expect_success 'subject lines are unencoded with --no-encode-email-headers'
test_cmp expect actual
'
-cat >expect <<'EOF'
+# NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
+# that contain multibyte chars.
+cat >expect <<EOF
Subject: [PATCH] Foö
EOF
test_expect_success 'subject lines are unencoded with format.encodeEmailHeaders=false' '
@@ -1656,7 +1662,9 @@ test_expect_success 'in-body headers trigger content encoding' '
test_env GIT_AUTHOR_NAME="éxötìc" test_commit exotic &&
test_when_finished "git reset --hard HEAD^" &&
git format-patch -1 --stdout --from >patch &&
- cat >expect <<-\EOF &&
+ # NOTE: do not quote this heredoc, Dash 0.5.13 has a bug with heredocs
+ # that contain multibyte chars.
+ cat >expect <<-EOF &&
From: C O Mitter <committer@example.com>
Content-Type: text/plain; charset=UTF-8