##// END OF EJS Templates
py3: fix missing b prefixes in test-arbitraryfilectx.t...
Augie Fackler -
r41365:5361f9ed default
parent child Browse files
Show More
@@ -14,6 +14,7 b' test-amend.t'
14 test-ancestor.py
14 test-ancestor.py
15 test-annotate.py
15 test-annotate.py
16 test-annotate.t
16 test-annotate.t
17 test-arbitraryfilectx.t
17 test-archive-symlinks.t
18 test-archive-symlinks.t
18 test-archive.t
19 test-archive.t
19 test-atomictempfile.py
20 test-atomictempfile.py
@@ -72,30 +72,30 b' Arbitraryfilectx.cmp does not follow sym'
72 These files are different and should return True (different):
72 These files are different and should return True (different):
73 (Note that filecmp.cmp's return semantics are inverted from ours, so we invert
73 (Note that filecmp.cmp's return semantics are inverted from ours, so we invert
74 for simplicity):
74 for simplicity):
75 $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['real_A'])"
75 $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'real_A'])"
76 True (no-eol)
76 True (no-eol)
77 $ hg eval "not filecmp.cmp('A', 'real_A')"
77 $ hg eval "not filecmp.cmp(b'A', b'real_A')"
78 True (no-eol)
78 True (no-eol)
79
79
80 These files are identical and should return False (same):
80 These files are identical and should return False (same):
81 $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['A'])"
81 $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'A'])"
82 False (no-eol)
82 False (no-eol)
83 $ hg eval "context.arbitraryfilectx('A', repo).cmp(repo[None]['B'])"
83 $ hg eval "context.arbitraryfilectx(b'A', repo).cmp(repo[None][b'B'])"
84 False (no-eol)
84 False (no-eol)
85 $ hg eval "not filecmp.cmp('A', 'B')"
85 $ hg eval "not filecmp.cmp(b'A', b'B')"
86 False (no-eol)
86 False (no-eol)
87
87
88 This comparison should also return False, since A and sym_A are substantially
88 This comparison should also return False, since A and sym_A are substantially
89 the same in the eyes of ``filectx.cmp``, which looks at data only.
89 the same in the eyes of ``filectx.cmp``, which looks at data only.
90 $ hg eval "context.arbitraryfilectx('real_A', repo).cmp(repo[None]['sym_A'])"
90 $ hg eval "context.arbitraryfilectx(b'real_A', repo).cmp(repo[None][b'sym_A'])"
91 False (no-eol)
91 False (no-eol)
92
92
93 A naive use of filecmp on those two would wrongly return True, since it follows
93 A naive use of filecmp on those two would wrongly return True, since it follows
94 the symlink to "A", which has different contents.
94 the symlink to "A", which has different contents.
95 #if symlink
95 #if symlink
96 $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
96 $ hg eval "not filecmp.cmp(b'real_A', b'sym_A')"
97 True (no-eol)
97 True (no-eol)
98 #else
98 #else
99 $ hg eval "not filecmp.cmp('real_A', 'sym_A')"
99 $ hg eval "not filecmp.cmp(b'real_A', b'sym_A')"
100 False (no-eol)
100 False (no-eol)
101 #endif
101 #endif
General Comments 0
You need to be logged in to leave comments. Login now