From 90d86a9744883ccc120a0a955ffade72990e1505 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 14 Apr 2016 21:03:00 +0200 Subject: Bug 1088022 - Bump min version to CGI 4.09 r=dkl --- t/004template.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 't') 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"); + } } } -- cgit v1.2.3-24-g4f1b