X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FSub-Op.git;a=blobdiff_plain;f=t%2F21-monkeypatch.t;fp=t%2F21-monkeypatch.t;h=0000000000000000000000000000000000000000;hp=5c08a22c516937f1cbc97c9b4d4ee5772215505b;hb=0eb003f3bbeeada878cab10f7dabc020c775b666;hpb=302bf09fbd4b673e199bdd22b330ebbdbec4e1fe diff --git a/t/21-monkeypatch.t b/t/21-monkeypatch.t deleted file mode 100644 index 5c08a22..0000000 --- a/t/21-monkeypatch.t +++ /dev/null @@ -1,49 +0,0 @@ -#!perl - -use strict; -use warnings; - -use Test::More; - -BEGIN { - if (exists $INC{'B.pm'} or exists $INC{'B/Deparse.pm'}) { - plan skip_all => 'Test::More loaded B or B::Deparse for some reason'; - } else { - plan tests => 5; - } -} - -use Sub::Op; - -sub stash_keys { - my ($pkg) = @_; - - no strict 'refs'; - keys %{"${pkg}::"}; -} - -BEGIN { - is_deeply [ sort +stash_keys 'B' ], [ sort - qw/OP:: Deparse:: Hooks::/, - qw/svref_2object/, - ], 'No extra symbols in B::'; - is_deeply [ sort +stash_keys 'B::Deparse' ], [ ], 'No symbols in B::Deparse'; -} - -use B; - -BEGIN { - for my $meth (qw/first can/) { - ok do { no strict 'refs'; defined &{"B::OP::$meth"} }, - "B::OP::$meth is now defined"; - } -} - -use B::Deparse; - -BEGIN { - for my $meth (qw/pp_custom/) { - ok do { no strict 'refs'; defined &{"B::Deparse::$meth"} }, - "B::Deparse::$meth is now defined"; - } -}