From ebcede353db35f838d95af20a3c033e6dc5e2619 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sat, 7 Jul 2012 11:35:47 +1200 Subject: [PATCH] Bug 5327 : Follow up for TTParser test (cherry picked from commit 0351ea525e36855c896db8a9f4d4f8cc36945896) Signed-off-by: Jared Camins-Esakov --- C4/TTParser.pm | 1 + xt/tt_valid.t | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/TTParser.pm b/C4/TTParser.pm index 87ad744a65..5058069e85 100644 --- a/C4/TTParser.pm +++ b/C4/TTParser.pm @@ -40,6 +40,7 @@ sub next_token{ #unshift token back on @tokens sub unshift_token{ + my $self = shift; unshift @tokens, shift; } diff --git a/xt/tt_valid.t b/xt/tt_valid.t index 97725ee370..f71085eea1 100755 --- a/xt/tt_valid.t +++ b/xt/tt_valid.t @@ -57,7 +57,8 @@ ok( !@files_with_directive_in_tag, "TT syntax: not using TT directive within HTM ); my $testtoken = 0; -C4::TTParser::unshift_token($testtoken); +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"); -- 2.39.5