]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - t/7_template_00_base.t
CGI::Ex 2.08
[chaz/p5-CGI-Ex] / t / 7_template_00_base.t
index 7fa643b5c0ac333018d9cd3569fa824110a56427..c1b17ba0917856449130348e78581fc744109afd 100644 (file)
@@ -14,7 +14,7 @@ BEGIN {
 };
 
 use strict;
-use Test::More tests => 515 - ($is_tt ? 103 : 0);
+use Test::More tests => 521 - ($is_tt ? 109 : 0);
 use Data::Dumper qw(Dumper);
 use constant test_taint => 0 && eval { require Taint::Runtime };
 
@@ -361,6 +361,14 @@ process_ok('[% {a => "B", c => "D"}.fmt %]' => "a\tB\nc\tD") if ! $is_tt;
 process_ok('[% {a => "B", c => "D"}.fmt("%s:%s") %]' => "a:B\nc:D") if ! $is_tt;
 process_ok('[% {a => "B", c => "D"}.fmt("%s:%s", "; ") %]' => "a:B; c:D") if ! $is_tt;
 
+process_ok('[% 1.format("%s") %]' => '1') if ! $is_tt;
+process_ok('[% 1.format("%*s", 6) %]' => '     1') if ! $is_tt;
+process_ok('[% 1.format("%-*s", 6) %]' => '1     ') if ! $is_tt;
+
+process_ok('[% 1.fmt("%-*s", 6) %]' => '1     ') if ! $is_tt;
+process_ok('[% [1,2].fmt("%-*s", "|", 6) %]' => '1     |2     ') if ! $is_tt;
+process_ok('[% {1=>2,3=>4}.fmt("%*s:%*s", "|", 3, 3) %]' => '  1:  2|  3:  4') if ! $is_tt;
+
 ###----------------------------------------------------------------###
 ### virtual objects
 
This page took 0.017655 seconds and 4 git commands to generate.