You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by co...@apache.org on 2017/01/06 14:54:03 UTC

svn commit: r1777621 - /perl/Apache-Test/trunk/lib/Apache/Test.pm

Author: covener
Date: Fri Jan  6 14:54:03 2017
New Revision: 1777621

URL: http://svn.apache.org/viewvc?rev=1777621&view=rev
Log:
fix need_min_apache_fix() 

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=1777621&r1=1777620&r2=1777621&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/Test.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/Test.pm Fri Jan  6 14:54:03 2017
@@ -502,20 +502,18 @@ 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 = $1;
-    my $current_minor = $2;
-    my $current_micro = $3;
+    (my $current) = $cfg->{server}->{version} =~ m:^Apache/((\d)\.(\d+)\.(\d+)):;
+    my $current_major = $2;
+    my $current_minor = $3;
+    my $current_micro = $4;
 
     foreach(@wantlevels) { 
-        if ($_ =~ m/(\d)\.(\d+)\.(\d+)/) { 
-             print "matched";
-        }
+        $_ =~ m/(\d)\.(\d+)\.(\d+)/;
         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";