diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-04-09 15:17:13 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-04-09 15:20:10 +0200 |
commit | a11e06d4906c2e1186779b42d5e87a17f66c50ea (patch) | |
tree | 1f37352641a20cfeb540a86e57dac3a8b5603f34 /application/tests | |
parent | 8be9c484e77b5bddb1964970b179f174c2f1105a (diff) |
Fix mime2lexer failing when using pygments info
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/tests')
-rw-r--r-- | application/tests/test_libraries_pygments.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/application/tests/test_libraries_pygments.php b/application/tests/test_libraries_pygments.php index ba2103e50..f88a4bcbd 100644 --- a/application/tests/test_libraries_pygments.php +++ b/application/tests/test_libraries_pygments.php @@ -32,6 +32,10 @@ class test_libraries_pygments extends Test { $p = new \libraries\Pygments('/invalid/filepath', 'application/x-php', 'stdin'); $this->t->is($p->autodetect_lexer(), 'php', "application/php should be php"); + // This is from pygments and not our hardcoded list + $p = new \libraries\Pygments('/invalid/filepath', 'text/x-pascal', 'stdin'); + $this->t->is($p->autodetect_lexer(), 'delphi', "text/x-pascal should be delphi"); + $p = new \libraries\Pygments('/invalid/filepath', 'application/octet-stream', 'stdin'); $this->t->is($p->autodetect_lexer(), false, "application/octet-stream should return false"); } |