From: Ben Morrow Date: Sun, 18 Jan 2009 08:25:23 +0000 (+0000) Subject: Adjust tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d3ebc3eb19094f82ef837b098bec51ec3d68e893;p=p5sagit%2Fp5-mst-13.2.git Adjust tests. --- diff --git a/t/op/filetest.t b/t/op/filetest.t index 7173c90..8c8ecd4 100755 --- a/t/op/filetest.t +++ b/t/op/filetest.t @@ -100,13 +100,19 @@ my $over; { package OverFtest; - use overload -X => sub { $over = \@_; "-$_[1]"; }; + use overload -X => sub { + $over = [overload::StrVal($_[0]), $_[1]]; + "-$_[1]"; + }; } my $o = bless [], "OverFtest"; +my $str = overload::StrVal($o); for my $op (split //, "rwxoRWXOezsfdlpSbctugkTMBAC") { + $over = []; ok( my $rv = eval "-$op \$o", "overloaded -$op succeeds" ); - is( $over->[0], $o, "correct object for overloaded -$op" ); + $@ and diag( $@ ); + is( $over->[0], $str, "correct object for overloaded -$op" ); is( $over->[1], $op, "correct op for overloaded -$op" ); is( $rv, "-$op", "correct return value for overloaded -$op"); }