Permalink
Browse files

*** empty log message ***

git-svn-id: svn://svn.tt2.org/tt/Template2/trunk@57 d5a88997-0a34-4036-9ed2-92fb5d660d91
  • Loading branch information...
1 parent 60dfe44 commit acff212415376a88d36b8c90377ad2894db7fab7 @abw committed Oct 9, 2000
Showing with 41 additions and 14 deletions.
  1. +26 −10 Makefile.PL
  2. +0 −1 t/cgi.t
  3. +6 −1 t/dom.t
  4. +4 −1 t/rss.t
  5. +5 −1 t/xpath.t
View
@@ -57,9 +57,10 @@ foreach my $mods ( [ XML::DOM => \&check_dom ],
[ DBI => \&dbi_config ] ) {
my ($module, $code) = @$mods;
+ printf(" %-12s - ", $module);
eval "use $module";
if ($@) {
- print " $module - skipping test (module not installed)\n";
+ print "skipping test (module not installed)\n";
}
else {
&$code;
@@ -113,35 +114,50 @@ EOF
#------------------------------------------------------------------------
-# check_dom_version()
+# check_dom()
+#
+# XML::DOM version 1.25 (and earlier?) dump core with Perl 5.6.0
#------------------------------------------------------------------------
sub check_dom {
if ($] == 5.006 && $XML::DOM::VERSION <= 1.25) {
- print " XML::DOM - version $XML::DOM::VERSION may not work with Perl $], skipping\n";
+ print "version $XML::DOM::VERSION may not work with Perl $], skipping\n";
}
else {
- print " XML::DOM - including tests\n";
+ print "version $XML::DOM::VERSION installed, including tests\n";
}
}
+#------------------------------------------------------------------------
+# check_rss()
+#
+# Version 0.8 of XML::RSS gave warnings under Perl 5.6.0 so issue an
+# upgrade recommendation
+#------------------------------------------------------------------------
+
sub check_rss {
- if ($XML::RSS::VERSION < 0.9) {
- print " XML::RSS - please upgrade to version 0.9 or later ($XML::RSS::VERSION installed)\n";
+ if ($] == 5.006 && $XML::RSS::VERSION < 0.9) {
+ print "please upgrade to version 0.9 or later ($XML::RSS::VERSION installed)\n";
}
else {
- print " XML::RSS - including tests\n";
+ print "version $XML::RSS::VERSION installed, including tests\n";
}
}
+#------------------------------------------------------------------------
+# check_xpath()
+#
+# Tests fail under some of the earlier versions (e.g. 0.55) so we issue
+# an upgrade recommendation.
+#------------------------------------------------------------------------
sub check_xpath {
if ($XML::XPath::VERSION < 1.00) {
- print " XML::XPath - please upgrade to version 1.00 or later ($XML::XPath::VERSION installed)\n";
+ print "please upgrade to version 1.00 or later ($XML::XPath::VERSION installed)\n";
}
else {
- print " XML::XPath - including tests\n";
+ print "version $XML::XPath::VERSION installed, including tests\n";
}
}
@@ -156,7 +172,7 @@ sub dbi_config {
my ($dsn, $user, $pass, $run);
$run = 1;
- print "\nConfiguration for DBI tests\n";
+ print "version $DBI::VERSION installed, configuring tests\n";
if (prompt("- Do you want to run the DBI tests?\n" .
" It requires access to an existing test database.",
View
@@ -83,4 +83,3 @@ name: Andy Wardley
-- process --
[% cgicheck %]
-
View
@@ -23,8 +23,13 @@ use Template::Test;
use Cwd qw( abs_path );
$^W = 1;
+# I hate having to do this
+my $shut_up_warnings = $XML::DOM::VERSION;
+
eval "use XML::DOM";
-if ($@) {
+
+# XML::DOM version 1.25 (and earlier?) dump core with Perl 5.006
+if ($@ || ($] == 5.006 && $XML::DOM::VERSION <= 1.25)) {
print "1..0\n";
exit(0);
}
View
@@ -23,8 +23,11 @@ use Template::Test;
use Cwd qw( abs_path );
$^W = 1;
+# I hate having to do this
+my $shut_up_warnings = $XML::RSS::VERSION;
+
eval "use XML::RSS";
-if ($@) {
+if ($@ || ($] == 5.006 && $XML::RSS::VERSION < 0.9)) {
print "1..0\n";
exit(0);
}
View
@@ -23,8 +23,12 @@ use Template::Test;
use Cwd qw( abs_path );
$^W = 1;
+# I hate having to do this
+my $shut_up_warnings = $XML::XPath::VERSION;
+
eval "use XML::XPath";
-if ($@) {
+
+if ($@ || $XML::XPath::VERSION < 1.1) {
print "1..0\n";
exit(0);
}

0 comments on commit acff212

Please sign in to comment.