##// END OF EJS Templates
py3: remove b'' from output of test-eol.t
Yuya Nishihara -
r38352:ae3f17a8 default
parent child Browse files
Show More
@@ -126,6 +126,7 b' test-eol-hook.t'
126 test-eol-patch.t
126 test-eol-patch.t
127 test-eol-tag.t
127 test-eol-tag.t
128 test-eol-update.t
128 test-eol-update.t
129 test-eol.t
129 test-excessive-merge.t
130 test-excessive-merge.t
130 test-exchange-obsmarkers-case-A1.t
131 test-exchange-obsmarkers-case-A1.t
131 test-exchange-obsmarkers-case-A2.t
132 test-exchange-obsmarkers-case-A2.t
@@ -7,7 +7,7 b' Test EOL extension'
7
7
8 Set up helpers
8 Set up helpers
9
9
10 $ cat > switch-eol.py <<EOF
10 $ cat > switch-eol.py <<'EOF'
11 > from __future__ import absolute_import
11 > from __future__ import absolute_import
12 > import os
12 > import os
13 > import sys
13 > import sys
@@ -17,8 +17,10 b' Set up helpers'
17 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
17 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
18 > except ImportError:
18 > except ImportError:
19 > pass
19 > pass
20 > eolmap = {b'\n': '\\n', b'\r\n': '\\r\\n'}
20 > (old, new) = sys.argv[1] == 'LF' and (b'\n', b'\r\n') or (b'\r\n', b'\n')
21 > (old, new) = sys.argv[1] == 'LF' and (b'\n', b'\r\n') or (b'\r\n', b'\n')
21 > print("%% switching encoding from %r to %r" % (old, new))
22 > print("%% switching encoding from '%s' to '%s'"
23 > % (eolmap[old], eolmap[new]))
22 > for path in sys.argv[2:]:
24 > for path in sys.argv[2:]:
23 > data = open(path, 'rb').read()
25 > data = open(path, 'rb').read()
24 > data = data.replace(old, new)
26 > data = data.replace(old, new)
General Comments 0
You need to be logged in to leave comments. Login now