[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
--- 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"