summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-01-09 13:15:36 +0100
committerGeorg Brandl <georg@python.org>2013-01-09 13:15:36 +0100
commit1b551e169d6c29d49c90baa62ea8886a7e8be46f (patch)
tree4c57f637cf7d23a1a52f058b1dba36d32d1ed73d /tests/test_examplefiles.py
parent01ff62d16bcb567d2c7becd241e2b5bfb1bd3a93 (diff)
parent73a4b067b9ec07088e7c2e77e3f3c040aedcd50c (diff)
downloadpygments-1b551e169d6c29d49c90baa62ea8886a7e8be46f.tar.gz
Merged in alastairh/pygments (pull request #141: Improve and unify C family language lexers)
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py4
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 = []