This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix utf char > IV_MAX on 32-bit platforms
[perl5.git] / t / op / filetest_stack_ok.t
index 3c212b1..ceff452 100644 (file)
@@ -6,16 +6,20 @@
 
 BEGIN {
     chdir 't' if -d 't';
-    @INC = '../lib';
     require './test.pl';
+    set_up_inc('../lib');
 }
 
 my @ops = split //, 'rwxoRWXOezsfdlpSbctugkTMBAC';
 
-plan( tests => @ops * 3 );
+plan( tests => @ops * 5 );
+
+package o { use overload '-X' => sub { 1 } }
+my $o = bless [], 'o';
 
 for my $op (@ops) {
     ok( 1 == @{ [ eval "-$op 'TEST'" ] }, "-$op returns single value" );
+    ok( 1 == @{ [ eval "-$op *TEST" ] }, "-$op *gv returns single value" );
 
     my $count = 0;
     my $t;
@@ -35,12 +39,11 @@ for my $op (@ops) {
            $t = eval "-$op -e \$^X" ? 0 : "bar";
        }
        elsif ($count == 1) {
-           local $TODO;
-           if ($op eq 'T' or $op eq 't' or $op eq 'B') {
-               $TODO = "[perl #77388] stacked file test does not work with -$op";
-           }
            is($m, "d", "-$op -e \$^X did not remove too many values from the stack");
        }
        $count++;
     }
+
+    my @foo = eval "-$op \$o";
+    is @foo, 1, "-$op \$overld did not leave \$overld on the stack";
 }