[Templates-cvs] cvs commit: Template2/t context.t
cvs@template-toolkit.org
cvs@template-toolkit.org
Tue, 14 Oct 2003 10:44:55 +0100
cvs 03/10/14 09:44:55
Modified: t context.t
Log:
* updated tests to pass document as first arg to visit()
Revision Changes Path
2.5 +5 -5 Template2/t/context.t
Index: context.t
===================================================================
RCS file: /template-toolkit/Template2/t/context.t,v
retrieving revision 2.4
retrieving revision 2.5
diff -u -r2.4 -r2.5
--- context.t 2002/08/08 12:00:54 2.4
+++ context.t 2003/10/14 09:44:55 2.5
@@ -13,7 +13,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: context.t,v 2.4 2002/08/08 12:00:54 abw Exp $
+# $Id: context.t,v 2.5 2003/10/14 09:44:55 abw Exp $
#
#========================================================================
@@ -97,11 +97,11 @@
eval { $context->template('some_block_1') };
ok( $@ );
-$context->visit($blocks1);
+$context->visit('no doc', $blocks1);
ok( $context->template('some_block_1') eq 'hello' );
eval { $context->template('some_block_2') };
ok( $@ );
-$context->visit($blocks2);
+$context->visit('no doc', $blocks2);
ok( $context->template('some_block_1') eq 'hello' );
ok( $context->template('some_block_2') eq 'world' );
$context->leave();
@@ -116,11 +116,11 @@
# test that reset() clears all blocks
-$context->visit($blocks1);
+$context->visit('no doc', $blocks1);
ok( $context->template('some_block_1') eq 'hello' );
eval { $context->template('some_block_2') };
ok( $@ );
-$context->visit($blocks2);
+$context->visit('no doc', $blocks2);
ok( $context->template('some_block_1') eq 'hello' );
ok( $context->template('some_block_2') eq 'world' );
$context->reset();