| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
use strict; |
|
2
|
|
|
|
|
|
|
use warnings; |
|
3
|
|
|
|
|
|
|
use Data::Dumper; |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use Test::More tests => 5; |
|
6
|
|
|
|
|
|
|
BEGIN { use_ok('Syntax::Kamelon') }; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $folder = './t'; |
|
9
|
|
|
|
|
|
|
my $index = "$folder/indexrc"; |
|
10
|
|
|
|
|
|
|
unlink $index; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $yashe = Syntax::Kamelon->new( |
|
13
|
|
|
|
|
|
|
xmlfolder => $folder, |
|
14
|
|
|
|
|
|
|
); |
|
15
|
|
|
|
|
|
|
ok(defined $yashe, 'Can create Kamelon'); |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
ok($yashe->{INDEXER}->{INDEX}->{'Test'}->{'file'} eq 'test.xml', "Indexing\n"); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$yashe->Reset; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$yashe->Syntax('Test'); |
|
22
|
|
|
|
|
|
|
ok($yashe->Syntax eq 'Test', 'Set a language'); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $thl = $yashe->GetLexer('Test'); |
|
25
|
|
|
|
|
|
|
ok(defined $thl, 'Create a highlighter'); |
|
26
|
|
|
|
|
|
|
# use Data::Dumper; |
|
27
|
|
|
|
|
|
|
# print Dumper $thl; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
unlink $index; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|