perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r614146 - /perl/modperl/trunk/t/modules/apache_status.t
Date Tue, 22 Jan 2008 08:33:56 GMT
Author: gozer
Date: Tue Jan 22 00:33:54 2008
New Revision: 614146

URL: http://svn.apache.org/viewvc?rev=614146&view=rev
Log:
Simplify the test as well as handle all possible Perl version
numbers possible. (5.10.0 for instance)


Modified:
    perl/modperl/trunk/t/modules/apache_status.t

Modified: perl/modperl/trunk/t/modules/apache_status.t
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/t/modules/apache_status.t?rev=614146&r1=614145&r2=614146&view=diff
==============================================================================
--- perl/modperl/trunk/t/modules/apache_status.t (original)
+++ perl/modperl/trunk/t/modules/apache_status.t Tue Jan 22 00:33:54 2008
@@ -18,13 +18,9 @@
 {
     my $url = "$base_url";
     my $body = GET_BODY_ASSERT $url;
-    (my $pver = $]) =~ s/00//;
-    $pver =~ s/(\d\.\d)(.*)/"$1." . ($2 ? int($2) : 0)/e;
-    #t_debug $body;
-    t_debug $pver;
-    # expecting: Embedded Perl version v5.8.2 for ...
-    ok $body =~ /$pver/;
-
+    # expecting: Embedded Perl version <b>v5.8.2</b> for ...
+    my $pver = $^V ? sprintf "v%vd", $^V : $];
+    ok t_cmp($body, qr[Embedded Perl version <b>$pver</b> for]);
     # menu_item, part 1
     # expecting: Test Entry
     ok $body =~ /Test Menu Entry/;



Mime
View raw message