X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSymbol.t;h=c8a7c0773f386cf5ab307c3d35b4df74e46943ca;hb=05bab18efbb4de63339671e0a2623b4e3e26cb88;hp=5763e5420e99df6fbd417a411caabaa74d9a78a4;hpb=ae716a98930f0a80b96ee5d383780578d69d0830;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Symbol.t b/lib/Symbol.t index 5763e54..c8a7c07 100755 --- a/lib/Symbol.t +++ b/lib/Symbol.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -use Test::More tests => 14; +use Test::More tests => 19; BEGIN { $_ = 'foo'; } # because Symbol used to clobber $_ @@ -65,3 +65,13 @@ use Symbol qw(qualify); # must import into this package too 'qualify() with an identifier starting with a _' ); ::ok( qualify("^FOO") eq "main::\cFOO", 'qualify() with an identifier starting with a ^' ); + +# tests for delete_package +package main; +$Transient::variable = 42; +ok( exists $::{'Transient::'}, 'transient stash exists' ); +ok( defined $Transient::{variable}, 'transient variable in stash' ); +Symbol::delete_package('Transient'); +ok( !exists $Transient::{variable}, 'transient variable no longer in stash' ); +is( scalar(keys %Transient::), 0, 'transient stash is empty' ); +ok( !exists $::{'Transient::'}, 'no transient stash' );