diff options
author | Georg Brandl <georg@python.org> | 2013-01-09 15:26:38 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-01-09 15:26:38 +0100 |
commit | 4b131f3cff47410eeefea9265f54daf013aeb146 (patch) | |
tree | 5438ab1ded773c0db1c6733f0f047f6dd7059ba9 /tests/test_examplefiles.py | |
parent | 5b6c6ef9341eaa25f4465081d58ecf03bf34c5a8 (diff) | |
parent | 1eda8027cbece3116620b8ae90a3bc61c5db119c (diff) | |
download | pygments-4b131f3cff47410eeefea9265f54daf013aeb146.tar.gz |
Merge pull request #115 (IDL lexer) from https://bitbucket.org/mgalloy/pygments-main/.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index 41acf4ef..d785cf3b 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -3,7 +3,7 @@ Pygments tests with example files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -58,6 +58,8 @@ def check_lexer(lx, absfn, outfn): text = text.strip(b('\n')) + b('\n') try: text = text.decode('utf-8') + if text.startswith(u'\ufeff'): + text = text[len(u'\ufeff'):] except UnicodeError: text = text.decode('latin1') ntext = [] |