[PATCH 7 of 8] tests: ensure that C and Python path encoding agree
Bryan O'Sullivan
bos at serpentine.com
Tue Nov 13 16:00:52 CST 2012
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1352842986 28800
# Node ID aed962e149d47bb8e42ed140f1deae19c7078f5b
# Parent d7177075d40bb0876695cf0532d8575829ac7800
tests: ensure that C and Python path encoding agree
diff --git a/tests/test-pathencode.py b/tests/test-pathencode.py
--- a/tests/test-pathencode.py
+++ b/tests/test-pathencode.py
@@ -154,7 +154,15 @@ def genpath(rng, count):
def runtests(rng, seed, count):
nerrs = 0
for p in genpath(rng, count):
- hybridencode(p)
+ he = hybridencode(p)
+ pe = parsers.pathencode(p)
+ if pe != he:
+ if nerrs == 0:
+ print >> sys.stderr, 'seed:', hex(seed)[:-1]
+ print >> sys.stderr, repr(p)
+ print >> sys.stderr, ' hybrid %r' % he
+ print >> sys.stderr, ' path %r' % pe
+ nerrs += 1
return nerrs
def main():
More information about the Mercurial-devel
mailing list