Mini Shell

Direktori : /home/.cpanm/work/1731937184.9052/Template-Toolkit-3.102/t/
Upload File :
Current File : //home/.cpanm/work/1731937184.9052/Template-Toolkit-3.102/t/math_rand.t

use strict;
use Test::More;
use Template;

plan tests => 1;

my @warnings;
local $SIG{__WARN__} = sub { push @warnings, @_ };
my $t = Template->new;
my $out;
$t->process(\<<EOF, {}, \$out) or die $t->error;
[% USE Math -%]
rand  with arg:    [% Math.rand(1000000) %]
rand  without arg: [% Math.rand %]
srand with arg:    [% Math.srand(1000000) %]
srand without arg: [% Math.srand %]
EOF
#diag $out;
is_deeply \@warnings, [], 'No warnings when calling rand/srand without arg';

Zerion Mini Shell 1.0