File: 10-case.t

package info (click to toggle)
libsyntax-highlight-engine-kate-perl 0.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,848 kB
  • sloc: perl: 84,065; ruby: 176; asm: 166; cpp: 144; jsp: 128; haskell: 116; sh: 111; f90: 99; python: 98; ml: 75; xml: 43; yacc: 37; ansic: 32; tcl: 29; lisp: 24; makefile: 14; awk: 13; php: 5
file content (27 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use strict;
use warnings;

use Test::More tests => 4;
use Test::Warn;
use Syntax::Highlight::Engine::Kate;

my $hl = new Syntax::Highlight::Engine::Kate();

is($hl->languagePlug( 'HTML'), 'HTML', 'Standard "HTML" should work');

subtest html => sub { 
	plan tests => 2;
	my $lang;
	warning_is { $lang = $hl->languagePlug( 'html') } q{undefined language: 'html'}, 'warn';
	is($lang, undef, 'Standard "html" should not work');
};

is($hl->languagePlug( 'HTML', 1), 'HTML', 'Insesitive "HTML" should work');

subtest html_1 => sub {
	plan tests => 2;
	my $lang;
	warning_is { $lang = $hl->languagePlug( 'html', 1) } 'substituting language HTML for html', 'warn';
	is($lang, 'HTML', 'Insesitive "html" should work');
};