diff options
author | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2000-06-25 11:04:01 +0000 |
commit | 2618fad5bbb2d0182eb31ed805c41b543c513940 (patch) | |
tree | 52ba93338b13aefd02a0055304a9eccfa0e049f5 /contrib/perl5/t/op/undef.t | |
parent | 77644ee620b6a79cf8c538abaf7cd301a875528d (diff) | |
download | FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.zip FreeBSD-src-2618fad5bbb2d0182eb31ed805c41b543c513940.tar.gz |
Vendor import of Perl 5.006
Diffstat (limited to 'contrib/perl5/t/op/undef.t')
-rwxr-xr-x | contrib/perl5/t/op/undef.t | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/contrib/perl5/t/op/undef.t b/contrib/perl5/t/op/undef.t index 5b3c7ef..8944ee3 100755 --- a/contrib/perl5/t/op/undef.t +++ b/contrib/perl5/t/op/undef.t @@ -1,6 +1,11 @@ #!./perl -print "1..23\n"; +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; +} + +print "1..27\n"; print defined($a) ? "not ok 1\n" : "ok 1\n"; @@ -59,3 +64,18 @@ print $@ =~ /^Modification of a read/ ? "ok 22\n" : "not ok 22\n"; eval { $1 = undef }; print $@ =~ /^Modification of a read/ ? "ok 23\n" : "not ok 23\n"; +{ + require Tie::Hash; + tie my %foo, 'Tie::StdHash'; + print defined %foo ? "ok 24\n" : "not ok 24\n"; + %foo = ( a => 1 ); + print defined %foo ? "ok 25\n" : "not ok 25\n"; +} + +{ + require Tie::Array; + tie my @foo, 'Tie::StdArray'; + print defined @foo ? "ok 26\n" : "not ok 26\n"; + @foo = ( a => 1 ); + print defined @foo ? "ok 27\n" : "not ok 27\n"; +} |