comparison tests/test-keyword.t @ 40221:6d52c2275c30

py3: add b'' prefixes to tests/test-keyword.t This test is now pretty close to passing on Python 3. # skip-blame because just b'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D5032
author Pulkit Goyal <pulkit@yandex-team.ru>
date Sat, 13 Oct 2018 04:29:03 +0300
parents a339b5e0d7c6
children eb131464c805
comparison
equal deleted inserted replaced
40220:c7ffc53fbd19 40221:6d52c2275c30
212 $ cp $HGRCPATH.nohooks $HGRCPATH 212 $ cp $HGRCPATH.nohooks $HGRCPATH
213 $ rm hooktest 213 $ rm hooktest
214 214
215 hg status of kw-ignored binary file starting with '\1\n' 215 hg status of kw-ignored binary file starting with '\1\n'
216 216
217 >>> open("i", "wb").write("\1\nfoo") and None 217 >>> open("i", "wb").write(b"\1\nfoo") and None
218 $ hg -q commit -Am metasep i 218 $ hg -q commit -Am metasep i
219 $ hg status 219 $ hg status
220 >>> open("i", "wb").write("\1\nbar") and None 220 >>> open("i", "wb").write(b"\1\nbar") and None
221 $ hg status 221 $ hg status
222 M i 222 M i
223 $ hg -q commit -m "modify metasep" i 223 $ hg -q commit -m "modify metasep" i
224 $ hg status --rev 2:3 224 $ hg status --rev 2:3
225 M i 225 M i
376 $ hg add r 376 $ hg add r
377 377
378 record chunk 378 record chunk
379 379
380 >>> lines = open('a', 'rb').readlines() 380 >>> lines = open('a', 'rb').readlines()
381 >>> lines.insert(1, 'foo\n') 381 >>> lines.insert(1, b'foo\n')
382 >>> lines.append('bar\n') 382 >>> lines.append(b'bar\n')
383 >>> open('a', 'wb').writelines(lines) 383 >>> open('a', 'wb').writelines(lines)
384 $ hg record -d '10 1' -m rectest a<<EOF 384 $ hg record -d '10 1' -m rectest a<<EOF
385 > y 385 > y
386 > y 386 > y
387 > n 387 > n
940 summary: firstline 940 summary: firstline
941 941
942 Imported patch should not be rejected 942 Imported patch should not be rejected
943 943
944 >>> import re 944 >>> import re
945 >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) 945 >>> text = re.sub(br'(Id.*)', br'\1 rejecttest', open('a', 'rb').read())
946 >>> open('a', 'wb').write(text) and None 946 >>> open('a', 'wb').write(text) and None
947 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>' 947 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
948 committing files: 948 committing files:
949 a 949 a
950 committing manifest 950 committing manifest