Permalink
Browse files

* added some tests to make sure lists didn't leak memory

git-svn-id: svn://svn.tt2.org/tt/Template2/trunk@873 d5a88997-0a34-4036-9ed2-92fb5d660d91
  • Loading branch information...
1 parent 5a78e8a commit 2bea327f22f0c0ddde9fe2a7bec1cf08458c3f1e @abw committed Jan 29, 2006
Showing with 16 additions and 2 deletions.
  1. +16 −2 t/leak.t
View
@@ -20,7 +20,7 @@
#========================================================================
use strict;
-use lib qw( ./lib ../lib );
+use lib qw( ./lib ../lib ../blib/arch );
use Template::Test;
$^W = 1;
@@ -82,7 +82,7 @@ my $ttcfg = {
PLUGIN_FACTORY => { holler => 'Plugin::Holler' },
EVAL_PERL => 1,
BLOCKS => {
- trace => "TRACE ==[% trace %]==",
+ trace => "TRACE ==[% trace %]==",
},
};
@@ -109,6 +109,20 @@ first created
first destroyed
-- test --
+[% clear; b = [ ]; b.0 = holler('list'); trace %]
+-- expect --
+list created
+
+-- test --
+[% trace %]
+-- expect --
+list created
+list destroyed
+
+-- stop --
+
+
+-- test --
[% BLOCK shout; a = holler('second'); END -%]
[% clear; PROCESS shout; trace %]
-- expect --

0 comments on commit 2bea327

Please sign in to comment.