diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 06:33:51 +0000 |
commit | 4f0770f3df78ecd5dcaefbd214f7a1415366bca6 (patch) | |
tree | 72661b8f81594b855bcc967b819263f63fa30e17 /debian/perl-framework/t/apache/mmn.t | |
parent | Adding upstream version 2.4.56. (diff) | |
download | apache2-4f0770f3df78ecd5dcaefbd214f7a1415366bca6.tar.xz apache2-4f0770f3df78ecd5dcaefbd214f7a1415366bca6.zip |
Adding debian version 2.4.56-1~deb11u2.debian/2.4.56-1_deb11u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/perl-framework/t/apache/mmn.t')
-rw-r--r-- | debian/perl-framework/t/apache/mmn.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/perl-framework/t/apache/mmn.t b/debian/perl-framework/t/apache/mmn.t new file mode 100644 index 0000000..985a8e6 --- /dev/null +++ b/debian/perl-framework/t/apache/mmn.t @@ -0,0 +1,42 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; + +# +# check that the comment and the #define in ap_mmn.h are equal +# + +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); |