# HG changeset patch # User Sylvain Thénault # Date 1367853405 -7200 # Node ID 045e449617ad0dcb4a2b6fbd7c8cfd5299a43015 # Parent c8520188eb4b005d2bed87341de461454002d81b [testlib] repreprocess content so contextual display has a chance to show the proper line. Closes #2869481 the context is calculated using position information relative to a preprocessed content, not the original source diff -r c8520188eb4b -r 045e449617ad devtools/testlib.py --- a/devtools/testlib.py Mon May 06 15:58:52 2013 +0200 +++ b/devtools/testlib.py Mon May 06 17:16:45 2013 +0200 @@ -938,6 +938,7 @@ # define filter if isinstance(content, str): content = unicode(content, sys.getdefaultencoding(), 'replace') + content = validator.preprocess_data(content) content = content.splitlines() width = int(log(len(content), 10)) + 1 line_template = " %" + ("%i" % width) + "i: %s"