perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1777623 - /perl/Apache-Test/trunk/lib/Apache/Test.pm
Date Fri, 06 Jan 2017 14:58:48 GMT
Author: covener
Date: Fri Jan  6 14:58:48 2017
New Revision: 1777623

URL: http://svn.apache.org/viewvc?rev=1777623&view=rev
Log:
revert r1777621

Modified:
    perl/Apache-Test/trunk/lib/Apache/Test.pm

Modified: perl/Apache-Test/trunk/lib/Apache/Test.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/Test.pm?rev=1777623&r1=1777622&r2=1777623&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Fri Jan  6 14:58:48 2017
@@ -502,24 +502,28 @@ sub need_min_apache_version {
 sub need_min_apache_fix {
     my @wantlevels = @_;
     my $cfg = Apache::Test::config();
-    (my $current) = $cfg->{server}->{version} =~ m:^Apache/((\d)\.(\d+)\.(\d+)):;
-    my $current_major = $2;
-    my $current_minor = $3;
-    my $current_micro = $4;
+    (my $current) = $cfg->{server}->{version} =~ m:^Apache/(\d)\.(\d+)\.(\d+):;
+    my $current_major = $1;
+    my $current_minor = $2;
+    my $current_micro = $3;
 
     foreach(@wantlevels) { 
-        $_ =~ m/(\d)\.(\d+)\.(\d+)/;
+        if ($_ =~ m/(\d)\.(\d+)\.(\d+)/) { 
+             print "matched";
+        }
         my $wanted_major = $1;
         my $wanted_minor = $2;
         my $wanted_micro = $3;
         if ($wanted_major eq $current_major && $wanted_minor eq $current_minor) {

-            if (normalize_vstring($wanted_micro) >= normalize_vstring($current_micro))
{
+            if (normalize_vstring($wanted_micro) < normalize_vstring($current_micro))
{
                 push @SkipReasons,
                      "apache version $_ or higher is required," .
                          " this is version $current";
                 return 0;
             }
             else { 
+                print     "OK, apache version $_ or higher is required," .
+                         " this is version $current\n";
                 return 1;
             }
         }



Mime
View raw message