summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2008-11-15 12:20:05 +0100
committergbrandl <devnull@localhost>2008-11-15 12:20:05 +0100
commit063ec2ef8922dece88520ee90eeb0e2205829dc2 (patch)
tree038249cfd4858ee912106c296409a921ff5e7d5d /tests/test_examplefiles.py
parent7723b5569aba42a90305274ee46700fcb3db16b1 (diff)
downloadpygments-063ec2ef8922dece88520ee90eeb0e2205829dc2.tar.gz
Next version will be 1.0.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index ddaa53bf..57d17033 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -42,7 +42,10 @@ def test_example_files():
def check_lexer(lx, absfn):
text = file(absfn, 'U').read()
text = text.strip('\n') + '\n'
- text = text.decode('latin1')
+ try:
+ text = text.decode('utf-8')
+ except UnicodeError:
+ text = text.decode('latin1')
ntext = []
for type, val in lx.get_tokens(text):
ntext.append(val)