Patchwork [03,of,10,STABLE] py3: account for extra line break in email headers in test-notify.t

login
register
mail settings
Submitter Denis Laxalde
Date Oct. 24, 2019, 3:30 p.m.
Message ID <3b9e9dfaf1e032307fa7.1571931034@steppe.local>
Download mbox | patch
Permalink /patch/42570/
State Accepted
Headers show

Comments

Denis Laxalde - Oct. 24, 2019, 3:30 p.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1571928996 -7200
#      Thu Oct 24 16:56:36 2019 +0200
# Branch stable
# Node ID 3b9e9dfaf1e032307fa725c69b4c1dee4d92f53e
# Parent  07e05c72d451036707ac8c7f9a283617ac9534f8
py3: account for extra line break in email headers in test-notify.t

Long headers appears to be wrapped with new lines. In test-notify.t, we
have a "filter.py" that replaces "\n" by " ", so we get an extra space
in a Message-Id with a long value.

---
Alternatively, the regex in filter.py could be updated, but I did not
find how.

Patch

diff --git a/tests/test-notify.t b/tests/test-notify.t
--- a/tests/test-notify.t
+++ b/tests/test-notify.t
@@ -211,7 +211,8 @@  pull (minimal config)
   Subject: changeset in $TESTTMP/b: b
   From: test@example.com
   X-Hg-Notification: changeset 00a13f371396
-  Message-Id: <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66@example.com>
+  Message-Id: <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66@example.com> (no-py3 !)
+  Message-Id:  <hg.ba3098a36bd4c297288d16788623a841f81f618ea961a0f0fd65de7eb1191b66@example.com> (py3 !)
   To: baz@example.com, foo@bar
   
   changeset 00a13f371396 in $TESTTMP/b