This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[PATCH] in 15899733 the condition was supposed to stay optional
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 16 Jul 2016 13:45:04 +0000 (16:45 +0300)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 16 Jul 2016 13:55:20 +0000 (16:55 +0300)
Addresses [perl #128630] commit "VAX: test changes for VAX floats" causesfails on Win32 in op/sprintf.t

While at it, comment the syntax a bit.

t/op/sprintf.t

index 4aef466..04fc4ce 100644 (file)
@@ -115,14 +115,22 @@ for (@tests) {
        # >comment skip: all<
        if ($os =~ /\ball\b/i) {
            $skip = 1;
-       } elsif ($os =~ /\b$^O(?::(\S+))\b/i) {
+       } elsif ($os =~ /\b$^O(?::(\S+))?\b/i) {
+            # We can have the $^O followed by an optional condition.
+            # The condition, if present, can be one of:
+            # (1) a regex between slashes...
+            #     tested as a regex against $Config{archname}
+            # (2) starts with a digit...
+            #     the first pair of dot-separated digits is
+            #     tested against $Config{osvers}
+            # (3) tested as literal string against $Config{archname}
             my $cond = $1;
             if ($cond =~ m{^/(.+)/$}) {
                 # >comment skip: solaris:/86/<
                 my $vsr = $1;
-                $skip = $Config{archname} =~ /$vsr/;
+                $skip = $archname =~ /$vsr/;
             } elsif ($cond =~ /^\d/) {
-                # >comment skip: VMS hpux:10.20<
+                # >comment skip: hpux:10.20<
                 my $vsn = $cond;
                 # Only compare on the the first pair of digits, as numeric
                 # compares do not like 2.6.10-3mdksmp or 2.6.8-24.10-default