X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=xt%2Ftt_valid.t;h=e33b760408fda80cda48972b3b5df7f74fa9aa08;hb=610b41434704583a51959e52937e4a7170a18258;hp=ae2e2e558180c0b1bcb43340be4178baa1262194;hpb=f80185efc46b34952656e00e9c2a1054bd888f52;p=koha_fer diff --git a/xt/tt_valid.t b/xt/tt_valid.t index ae2e2e5581..e33b760408 100755 --- a/xt/tt_valid.t +++ b/xt/tt_valid.t @@ -19,7 +19,7 @@ use warnings; use strict; -use Test::More tests => 1; +use Test::More tests => 2; use File::Find; use Cwd; use C4::TTParser; @@ -38,7 +38,7 @@ my @files_with_directive_in_tag = do { while ( my $token = $parser->next_token ) { my $attr = $token->{_attr}; next unless $attr; - push @lines, $token->{_lc} if $attr->{'[%'}; + push @lines, $token->{_lc} if $attr->{'[%'} or $attr->{'[%-'}; } ($dir) = $dir =~ /koha-tmpl\/(.*)$/; push @files, { name => "$dir/$name", lines => \@lines } if @lines; @@ -56,6 +56,11 @@ ok( !@files_with_directive_in_tag, "TT syntax: not using TT directive within HTM } @files_with_directive_in_tag ) ); +my $testtoken = 0; +my $ttparser = C4::TTParser->new(); +$ttparser->unshift_token($testtoken); +my $testtokenagain = C4::TTParser::next_token(); +is( $testtoken, $testtokenagain, "Token received same as original put on stack"); =head1 NAME