diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-09-27 14:59:12 -0300 |
---|---|---|
committer | Brian Fraser <fraserbn@gmail.com> | 2014-01-04 15:37:48 -0300 |
commit | 559d64fb313a6fefb155ad878b0887c48a1570e7 (patch) | |
tree | 798a0c5a5fe48b066c387202bf9b1ccb99b9b454 /ext/Devel-Peek | |
parent | b24fda9d47697aebc6f3808abd8e5e93dea33a72 (diff) | |
download | perl-559d64fb313a6fefb155ad878b0887c48a1570e7.tar.gz |
Fixups for ext/Devel-Peek/t/Peek.t
Diffstat (limited to 'ext/Devel-Peek')
-rw-r--r-- | ext/Devel-Peek/t/Peek.t | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 0f48eb4db2..18c40d7161 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -1266,7 +1266,6 @@ do_test('UTF-8 in a regular expression', my $ref = \%hash; is(Devel::Peek::SvREFCNT(%hash), $base_count + 1, "SvREFCNT on non-scalar"); } - { # utf8 tests use utf8; @@ -1274,12 +1273,13 @@ use utf8; sub _dump { open(OUT,">peek$$") or die $!; open(STDERR, ">&OUT") or die "Can't dup OUT: $!"; - Dump($_[1]); + Dump($_[0]); open(STDERR, ">&SAVERR") or die "Can't restore STDERR: $!"; close(OUT); open(IN, "peek$$") or die $!; my $dump = do { local $/; <IN> }; close(IN); + 1 while unlink "peek$$"; return $dump; } @@ -1388,11 +1388,10 @@ EOP sub get_outside { eval "sub $_[0] { my \$x; \$x++; return sub { eval q{\$x} } } $_[0]()"; - } -sub food { my $x; return sub { $x } } +sub basic { my $x; return eval q{sub { eval q{$x} }} } like( - _dump(food()), + _dump(basic()), qr/OUTSIDE = 0x[[:xdigit:]]+\s+\Q(basic)/, 'OUTSIDE works' ); |