summaryrefslogtreecommitdiffstats
path: root/t/004template.t
diff options
context:
space:
mode:
Diffstat (limited to 't/004template.t')
-rw-r--r--t/004template.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/004template.t b/t/004template.t
index e6c241cc0..5296564ae 100644
--- a/t/004template.t
+++ b/t/004template.t
@@ -22,7 +22,7 @@ use CGI qw(-no_debug);
use File::Spec;
use Template;
-use Test::More tests => ( scalar(@referenced_files) + 2 * $num_actual_files );
+use Test::More tests => ( scalar(@referenced_files) + 3 * $num_actual_files );
# Capture the TESTOUT from Test::More or Test::Builder for printing errors.
# This will handle verbosity for us automatically.
@@ -117,6 +117,14 @@ foreach my $include_path (@include_paths) {
else {
ok(1, "$path contains no blacklisted constructs");
}
+
+ # Forbid cgi.param(). cgi_param() must be used instead.
+ if ($data =~ /cgi\.param/) {
+ ok(0, "$path calls cgi.param() instead of cgi_param()");
+ }
+ else {
+ ok(1, "$path correctly calls CGI parameters");
+ }
}
}