httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r960098 - /httpd/test/framework/trunk/t/apache/mmn.t
Date Fri, 02 Jul 2010 20:41:10 GMT
Author: sf
Date: Fri Jul  2 20:41:10 2010
New Revision: 960098

URL: http://svn.apache.org/viewvc?rev=960098&view=rev
Log:
Disband the club of people who update the comment section of ap_mmn.h
but not the code.

Added:
    httpd/test/framework/trunk/t/apache/mmn.t

Added: httpd/test/framework/trunk/t/apache/mmn.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/mmn.t?rev=960098&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/apache/mmn.t (added)
+++ httpd/test/framework/trunk/t/apache/mmn.t Fri Jul  2 20:41:10 2010
@@ -0,0 +1,38 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+
+plan tests => 2, need_apache 2;
+
+my $config = Apache::TestConfig->thaw();
+my $filename = $config->apxs('INCLUDEDIR') . '/ap_mmn.h';
+
+my $cmajor;
+my $cminor;
+my $major;
+my $minor;
+my $skip;
+if (open(my $fh, "<", $filename)) {
+    while (defined (my $line = <$fh>)) {
+        if ($line =~ m/^\s+[*]\s+(\d{8})[.](\d)\s+\([\d.]+(?:-dev)?\)\s/ ) {
+            $cmajor = $1;
+            $cminor = $2;
+        }
+        elsif ($line =~ m{^#define\s+MODULE_MAGIC_NUMBER_MAJOR\s+(\d+)(?:\s|$)}) 
+        {
+            $major = $1;
+        }
+        elsif ($line =~ m{^#define\s+MODULE_MAGIC_NUMBER_MINOR\s+(\d+)(?:\s|$)}) 
+        {
+            $minor = $1;
+        }
+    }
+    close($fh);
+}
+else {
+    $skip = "Skip if can't read $filename";
+}
+
+skip($skip, $major, $cmajor);
+skip($skip, $minor, $cminor);



Mime
View raw message