summaryrefslogtreecommitdiffstats
path: root/application/test/tests
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-11-23 14:43:55 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-11-23 14:43:55 +0100
commit9c695761a303b7cf1b37905bda3395ed60adeb30 (patch)
treed2a04ffe1e3eb75b6cdc43ca087e4bf47759f7f4 /application/test/tests
parent9eed447539bb2c2bdab13a2306c2be36963df37b (diff)
l/Pygments: Fix exception for filenames ending with a dot
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/test/tests')
-rw-r--r--application/test/tests/test_libraries_pygments.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/application/test/tests/test_libraries_pygments.php b/application/test/tests/test_libraries_pygments.php
index 768bca439..d6bb559ee 100644
--- a/application/test/tests/test_libraries_pygments.php
+++ b/application/test/tests/test_libraries_pygments.php
@@ -80,7 +80,14 @@ class test_libraries_pygments extends \test\Test {
{
$p = new \libraries\Pygments('/invalid/filepath', 'image/svg+xml', 'foo.svg');
$this->t->is($p->can_highlight(), true, "image/svg+xml can highlight");
- }
+ }
+
+ public function test_autodetect_lexer_strangeFilenames()
+ {
+ $p = new \libraries\Pygments('/invalid/filepath', 'text/plain', 'foo.');
+ $this->t->is($p->autodetect_lexer(), 'text', "foo. should be text");
+
+ }
}