diff options
author | Igor Kalnitsky <igor@kalnitsky.org> | 2012-02-07 21:29:58 +0200 |
---|---|---|
committer | Igor Kalnitsky <igor@kalnitsky.org> | 2012-02-07 21:29:58 +0200 |
commit | 3d1b3982a4b4fb5dc8ad5eba70b2416fb980b8ec (patch) | |
tree | f086edf649eceda1602c73e3559b786585287407 /tests/test_examplefiles.py | |
parent | 62213ae784abde261ec76d59d3bbfc2f0967dc28 (diff) | |
parent | b42b337d32c87768594934d01e0f40b4c83a435f (diff) | |
download | pygments-3d1b3982a4b4fb5dc8ad5eba70b2416fb980b8ec.tar.gz |
Merge with birkenfeld/pygments-main
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 7 |
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(), |