Make tie_fetch_count.t skip -[guk] globref tests
authorFather Chrysostomos <sprout@cpan.org>
Fri, 16 Sep 2011 01:08:17 +0000 (18:08 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 16 Sep 2011 01:08:17 +0000 (18:08 -0700)
When trying to fix this before (4a021280) I assumed that these func-
tions would die on primitive platforms, without even looking at the
code to make sure.

They don’t die, but return false.

Since Config does not list them, we just have to skip the -k \$tied
tests on all platforms.

Since they share the same code as a whole list of other filetest ops,
I think this code is still tested well enough.

t/op/tie_fetch_count.t

index 1597120..ed070e0 100644 (file)
@@ -7,7 +7,7 @@ BEGIN {
     chdir 't' if -d 't';
     @INC = '../lib';
     require './test.pl';
-    plan (tests => 286);
+    plan (tests => 283);
 }
 
 use strict;
@@ -125,16 +125,10 @@ for (split //, 'rwxoRWXOezsfdpSbctugkTBMAC') {
     # Make $var hold a glob:
     $var = *dummy; $dummy = $var; $count = 0;
     $dummy  = eval "-$_ \$var"; check_count "-$_ \$tied_glob";
+    next if /[guk]/;
     $var = *dummy; $dummy = $var; $count = 0;
-    if (eval "\$dummy = -$_ \\\$var; 1") {
-        check_count "-$_ \\\$tied_glob";
-    }
-    else {
-        $count = 0;
-        SKIP: {
-            skip "-$_ not supported on this platform?", 1;
-        }
-    }
+    eval "\$dummy = -$_ \\\$var";
+    check_count "-$_ \\\$tied_glob";
 }
 $dummy  = -l $var       ; check_count '-l';