[Templates-cvs] cvs commit: TT3/t plugins.t
cvs@template-toolkit.org
cvs@template-toolkit.org
Fri, 26 Mar 2004 13:27:18 +0000
cvs 04/03/26 13:27:17
Modified: t plugins.t
Log:
* test object/class fetch() method
Revision Changes Path
1.2 +10 -7 TT3/t/plugins.t
Index: plugins.t
===================================================================
RCS file: /template-toolkit/TT3/t/plugins.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- plugins.t 2004/03/26 13:19:21 1.1
+++ plugins.t 2004/03/26 13:27:17 1.2
@@ -9,7 +9,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: plugins.t,v 1.1 2004/03/26 13:19:21 abw Exp $
+# $Id: plugins.t,v 1.2 2004/03/26 13:27:17 abw Exp $
#
#========================================================================
@@ -144,7 +144,7 @@
#------------------------------------------------------------------------
-# package method
+# package method fetch()
#------------------------------------------------------------------------
my $plugin = Template::Plugins->fetch('CONTEXT', 'hello')
@@ -161,9 +161,15 @@
'Salut le Monde! in french' );
-$plugin = Template::Plugins->fetch('CONTEXT', 'hello',
+#------------------------------------------------------------------------
+# object method fetch()
+#------------------------------------------------------------------------
+
+$plugins = Template::Plugins->new();
+
+$plugin = $plugins->fetch('CONTEXT', 'hello',
{ language => 'german' } )
- || die Template::Plugins->error();
+ || die $plugins->error();
ok( $plugin, 'got german hello plugin' );
@@ -178,9 +184,6 @@
-#------------------------------------------------------------------------
-# object method with extra plugins, path, etc.
-#------------------------------------------------------------------------
__END__