Bug 5327 : Added coverage to unit test for TTParser

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test passes.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 796127e4b9)

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Duncan Tyler 2011-12-09 11:29:53 +13:00 committed by Jared Camins-Esakov
parent d43e8c42d4
commit 2eb76ec047
2 changed files with 5 additions and 2 deletions

View File

@ -40,7 +40,6 @@ sub next_token{
#unshift token back on @tokens
sub unshift_token{
my $self = shift;
unshift @tokens, shift;
}

View File

@ -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;
@ -56,6 +56,10 @@ ok( !@files_with_directive_in_tag, "TT syntax: not using TT directive within HTM
} @files_with_directive_in_tag )
);
my $testtoken = 0;
C4::TTParser::unshift_token($testtoken);
my $testtokenagain = C4::TTParser::next_token();
is( $testtoken, $testtokenagain, "Token received same as original put on stack");
=head1 NAME