[Templates-cvs] cvs commit: Template2/t url.t
cvs@template-toolkit.org
cvs@template-toolkit.org
cvs 06/01/30 17:46:41
Modified: t url.t
Log:
* added test for $JOINT
Revision Changes Path
2.8 +10 -1 Template2/t/url.t
Index: url.t
===================================================================
RCS file: /template-toolkit/Template2/t/url.t,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- url.t 2006/01/05 09:11:39 2.7
+++ url.t 2006/01/30 17:46:41 2.8
@@ -11,7 +11,7 @@
# This is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
-# $Id: url.t,v 2.7 2006/01/05 09:11:39 abw Exp $
+# $Id: url.t,v 2.8 2006/01/30 17:46:41 abw Exp $
#
#========================================================================
@@ -53,6 +53,7 @@
my $vars = {
url => $urls,
sorted => \&sort_params,
+ no_escape => sub { $Template::Plugin::URL::JOINT = '&' },
};
test_expect(\*DATA, { INTERPOLATE => 1 }, $vars);
@@ -169,3 +170,11 @@
-- expect --
/product?action=edit&style=editor
/product?action=edit&style=compact
+
+-- test --
+[% CALL no_escape -%]
+[% url.product.edit %]
+[% url.product.edit(style='compact') %]
+-- expect --
+/product?action=edit&style=editor
+/product?action=edit&style=compact