tests/unwrap-message-id.py
author Matt Harbison <matt_harbison@yahoo.com>
Thu, 26 Aug 2021 11:04:14 -0400
branchstable
changeset 47865 769cd5703b2c
parent 44432 a1908951ca42
child 48966 6000f5b25c9b
permissions -rw-r--r--
hg: don't attempt to extend `sys.path` with the user site without `APPDATA` This variable is created by the system and *should* be available, but test-lfs-bundle.t has a test where it is explicitly unset. It wasn't caught before because prior to 95af358fcdfe, it was limited to the py2exe binary. As a precaution, fix both that and the pyoxidizer case that was causing the test to fail. Differential Revision: https://phab.mercurial-scm.org/D11354
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43334
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     1
from __future__ import absolute_import, print_function
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     2
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     3
import sys
4128ffba4431 tests: handle Message-Id email header possible wrapping
Denis Laxalde <denis@laxalde.org>
parents:
diff changeset
     4
44432
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     5
for line in sys.stdin:
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     6
    if line.lower() in ("message-id: \n", "in-reply-to: \n"):
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     7
        line = line[:-2]
a1908951ca42 tests: handle In-Reply-To headers for line wrapping
Joerg Sonnenberger <joerg@bec.de>
parents: 43334
diff changeset
     8
    print(line, end="")