summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-05 13:11:54 +0100
committerGeorg Brandl <georg@python.org>2012-02-05 13:11:54 +0100
commit384e3a8e9aa2b72b16e0daede06c5973305ae9cd (patch)
treea8e016d4b500242a0fad321418955bf610ae3a36 /tests/test_examplefiles.py
parent7d9fd398089c674c839f8e095dee022b087cf19f (diff)
parent69af79be2e99f8d7124607c27d8a35389416f3f5 (diff)
downloadpygments-384e3a8e9aa2b72b16e0daede06c5973305ae9cd.tar.gz
Merge Fantom lexer from https://bitbucket.org/ivan_inozemtsev/pygments-main
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index e5dbcf4c..4ab2912e 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -3,7 +3,7 @@
Pygments tests with example files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2006-2011 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -60,8 +60,9 @@ def check_lexer(lx, absfn, outfn):
tokens = []
for type, val in lx.get_tokens(text):
ntext.append(val)
- assert type != Error, 'lexer %s generated error token for %s' % \
- (lx, absfn)
+ assert type != Error, \
+ 'lexer %s generated error token for %s: %r at position %d' % \
+ (lx, absfn, val, len(u''.join(ntext)))
tokens.append((type, val))
if u''.join(ntext) != text:
print '\n'.join(difflib.unified_diff(u''.join(ntext).splitlines(),