##// END OF EJS Templates
py3: use bytes stdout in test-check-help.t...
Matt Harbison -
r41036:b6c610bf default
parent child Browse files
Show More
@@ -10,13 +10,14 b''
10 10 > import msvcrt
11 11 > import os
12 12 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
13 > stdout = getattr(sys.stdout, 'buffer', sys.stdout)
13 14 > topics = set()
14 15 > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`')
15 16 > for fname in sys.argv:
16 17 > with open(fname, 'rb') as f:
17 18 > topics.update(m.group(1) for m in topicre.finditer(f.read()))
18 19 > for s in sorted(topics):
19 > print(s)
20 > stdout.write(b'%s\n' % s)
20 21 > EOF
21 22
22 23 $ cd "$TESTDIR"/..
General Comments 0
You need to be logged in to leave comments. Login now