From 99fb6ca90d10648a3d2e7a16188d6ed3e0cb7e4f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Jul 2016 16:04:22 +0200 Subject: Add special *.asciinema.json filename Don't force users to name all their files asciinema.json. Give them some room for descriptive names. Signed-off-by: Florian Pritz --- application/test/tests/test_libraries_pygments.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'application/test') diff --git a/application/test/tests/test_libraries_pygments.php b/application/test/tests/test_libraries_pygments.php index d6bb559ee..57c5d27fe 100644 --- a/application/test/tests/test_libraries_pygments.php +++ b/application/test/tests/test_libraries_pygments.php @@ -47,6 +47,12 @@ class test_libraries_pygments extends \test\Test { $p = new \libraries\Pygments('/invalid/filepath', 'text/plain', 'PKGBUILD'); $this->t->is($p->autodetect_lexer(), 'bash', "PKGBUILD should be bash"); + + $p = new \libraries\Pygments('/invalid/filepath', 'text/plain', 'asciinema.json'); + $this->t->is($p->autodetect_lexer(), 'asciinema', "asciinema.json should be asciinema"); + + $p = new \libraries\Pygments('/invalid/filepath', 'text/plain', 'test.asciinema.json'); + $this->t->is($p->autodetect_lexer(), 'asciinema', "asciinema.json should be asciinema"); } public function test_autodetect_lexer_specialFilenamesBinaryShouldNotHighlight() -- cgit v1.2.3-24-g4f1b