py3: make sure we write bytes in a file open in bytes mode
# skip-blame just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D2519
--- a/tests/test-grep.t Thu Mar 01 23:58:21 2018 +0530
+++ b/tests/test-grep.t Thu Mar 01 23:59:20 2018 +0530
@@ -271,7 +271,7 @@
match in last "line" without newline
- $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
+ $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write(b"no infinite loop"); fp.close();'
$ hg ci -Amnoeol
adding noeol
$ hg grep loop