Skip to content

Commit

Permalink
t/issue172.t added. with and without manual workaround -uFoo
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Dec 24, 2013
1 parent 9b35d28 commit 32d7c7d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions t/issue172.t
@@ -0,0 +1,23 @@
#! /usr/bin/env perl
# http://code.google.com/p/perl-compiler/issues/detail?id=172
# overload misses to mark the overloaded package
use strict;
BEGIN {
unshift @INC, 't';
require "test.pl";
}
use Test::More tests => 2;
my $script = <<'EOF';
package Foo;
use overload q("") => sub { "Foo" };
package main;
my $foo = bless {}, "Foo";
print "ok\n" if "$foo" eq "Foo";
print "$foo\n";
EOF

# to be fixed with 1.42_67
use B::C ();
my $todo = ($B::C::VERSION ge '1.42_67') ? "" : "TODO ";
ctest(1, "ok\nFoo",'C','ccode208i',$script,$todo.'#172 miss to mark the overloaded package');
ctest(2, "ok\nFoo",'C,-uFoo','ccode208i',$script,'#172 -uFoo includes overloaded package');

0 comments on commit 32d7c7d

Please sign in to comment.