--- a/contrib/python3-whitelist Sat Jun 16 17:53:51 2018 +0900
+++ b/contrib/python3-whitelist Sat Jun 16 17:54:29 2018 +0900
@@ -126,6 +126,7 @@
test-eol-patch.t
test-eol-tag.t
test-eol-update.t
+test-eol.t
test-excessive-merge.t
test-exchange-obsmarkers-case-A1.t
test-exchange-obsmarkers-case-A2.t
--- a/tests/test-eol.t Sat Jun 16 17:53:51 2018 +0900
+++ b/tests/test-eol.t Sat Jun 16 17:54:29 2018 +0900
@@ -7,7 +7,7 @@
Set up helpers
- $ cat > switch-eol.py <<EOF
+ $ cat > switch-eol.py <<'EOF'
> from __future__ import absolute_import
> import os
> import sys
@@ -17,8 +17,10 @@
> msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
> except ImportError:
> pass
+ > eolmap = {b'\n': '\\n', b'\r\n': '\\r\\n'}
> (old, new) = sys.argv[1] == 'LF' and (b'\n', b'\r\n') or (b'\r\n', b'\n')
- > print("%% switching encoding from %r to %r" % (old, new))
+ > print("%% switching encoding from '%s' to '%s'"
+ > % (eolmap[old], eolmap[new]))
> for path in sys.argv[2:]:
> data = open(path, 'rb').read()
> data = data.replace(old, new)