HEX
Server: Apache
System: Linux server-634962.emtiyz.com 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: codo66ho (1003)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/.cpan/build/Template-Toolkit-3.102-0/t/parser2.t
#============================================================= -*-perl-*-
#
# t/parser.t
#
# Test the Template::Parser module.
#
# Written by Colin Keith <ckeith@cpan.org>
#
# Copyright (C) 2012 Colin Keith. All Rights Reserved
# Copyright (C) 2012 Hagen Software, Inc.
#
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
# $Id$
# 
#========================================================================

use strict;
use lib qw( . ../lib );
use Template::Test;
use Template::Config;
use Template::Parser;
$^W = 1;

#$Template::Test::DEBUG = 0;
#$Template::Test::PRESERVE = 1;
#$Template::Stash::DEBUG = 1;
#$Template::Parser::DEBUG = 1;
#$Template::Directive::PRETTY = 1;

my $p = Template::Parser->new();
my $expectedText = 'this is a test';
my($tokens) = $p->split_text(<<EOF);
[%

'$expectedText';
%]
EOF

is($tokens->[0]->[1], '3-4', 'Correctly exclude blank lines preceeding a directive from line number count');

1;