perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1777621 - /perl/Apache-Test/trunk/lib/Apache/Test.pm
Date Fri, 06 Jan 2017 14:54:03 GMT
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";



Mime
View raw message