From 09114c215c8c58595964ff017ab80394860fd75b Mon Sep 17 00:00:00 2001 From: "zach%zachlipton.com" <> Date: Thu, 4 Apr 2002 04:01:01 +0000 Subject: Fix for bug 98658: Let administrator know which customised templates have been updated by Bugzilla team. Patch adds a version string to every template and a check in t/004template.t to check for version strings in templates. Note that two templates that were not included in the initial patch now have version strings added. r=justdave, r2=myk --- t/004template.t | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/004template.t b/t/004template.t index 4c3c898c1..e831e42e4 100644 --- a/t/004template.t +++ b/t/004template.t @@ -18,15 +18,16 @@ # Rights Reserved. # # Contributor(s): Jacob Steenhagen +# Zach Lipton # ################# #Bugzilla Test 4# -##Templates###### +####Templates#### BEGIN { use lib "t/"; } BEGIN { use Support::Templates; } -BEGIN { $tests = @Support::Templates::testitems * 2; } +BEGIN { $tests = @Support::Templates::testitems * 3; } BEGIN { use Test::More tests => $tests; } use strict; @@ -80,10 +81,23 @@ foreach my $file(@testitems) { } } else { - ok(1, "$file doesn't exists, skipping test"); + ok(1, "$file doesn't exist, skipping test"); } } open STDOUT, ">&SAVEOUT"; # redirect back to original stream open STDERR, ">&SAVEERR"; close SAVEOUT; close SAVEERR; + +# check to see that all templates have a version string: + +foreach my $file(@testitems) { + open(TMPL,"$include_path/$file"); + my $firstline = ; + if ($firstline =~ //) { + ok(1,"$file has a version string"); + } else { + ok(0,"$file does not have a version string --ERROR"); + } + close(TMPL); +} -- cgit v1.2.3-24-g4f1b