diff options
author | Georg Brandl <georg@python.org> | 2014-01-09 17:35:34 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-09 17:35:34 +0100 |
commit | bd5ae968ec3442d12e7a6d453c7973145d364ba0 (patch) | |
tree | cfbe4b22b8d8591d5f0e2a43dcf67d36aff6d39f /tests/test_examplefiles.py | |
parent | ad252410a347ad13c8206c8c9fa0a9e33632e10f (diff) | |
parent | dbcb3df465137d3645a1cea00184fbb55af1d141 (diff) | |
download | pygments-bd5ae968ec3442d12e7a6d453c7973145d364ba0.tar.gz |
Merged in j3lamp/pygments-main (pull request #206)
Fix for Issue #875
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r-- | tests/test_examplefiles.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py index d785cf3b..c3e3b2f7 100644 --- a/tests/test_examplefiles.py +++ b/tests/test_examplefiles.py @@ -31,10 +31,13 @@ def test_example_files(): absfn = os.path.join(testdir, 'examplefiles', fn) if not os.path.isfile(absfn): continue + + code = open(absfn).read() + outfn = os.path.join(outdir, fn) try: - lx = get_lexer_for_filename(absfn) + lx = get_lexer_for_filename(absfn, code=code) except ClassNotFound: if "_" not in fn: raise AssertionError('file %r has no registered extension, ' |