summaryrefslogtreecommitdiff
path: root/t/lib
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2002-03-10 08:27:12 -0500
committerAbhijit Menon-Sen <ams@wiw.org>2002-03-11 04:53:50 +0000
commit492935018b279c3965aa25ebfc1c7f28faf8fae0 (patch)
tree5dbd445eab6829e4a7d66c88aa59e40111b57a5e /t/lib
parentb4e83e5bb325c4a237d83150af9e71a1219f53fa (diff)
downloadperl-492935018b279c3965aa25ebfc1c7f28faf8fae0.tar.gz
Subject: [PATCH] Hash::Util & restricted hash touch up, part 1
Date: Sun, 10 Mar 2002 13:27:12 -0500 Message-Id: <20020310182712.GC693@blackrider> Subject: [PATCH] Hash::Util part 2 From: Michael G Schwern <schwern@pobox.com> Date: Sun, 10 Mar 2002 15:09:34 -0500 Message-Id: <20020310200934.GB27112@blackrider> Subject: [PATCH] Hash::Util MANIFEST correction From: Michael G Schwern <schwern@pobox.com> Date: Sun, 10 Mar 2002 16:27:07 -0500 Message-Id: <20020310212707.GF27112@blackrider> (Also changes find.t and taint.t, which were looking for access.t) p4raw-id: //depot/perl@15166
Diffstat (limited to 't/lib')
-rw-r--r--t/lib/access.t82
1 files changed, 0 insertions, 82 deletions
diff --git a/t/lib/access.t b/t/lib/access.t
deleted file mode 100644
index da7193e6d4..0000000000
--- a/t/lib/access.t
+++ /dev/null
@@ -1,82 +0,0 @@
-#!./perl
-
-BEGIN {
- chdir 't' if -d 't';
- @INC = '../lib';
-}
-
-$| = 1;
-print "1..19\n";
-
-my $t = 1;
-
-sub ok
-{
- my $val = shift;
- if ($val)
- {
- print "ok $t\n";
- }
- else
- {
- my ($pack,$file,$line) = caller;
- print "not ok $t # $file:$line\n";
- }
- $t++;
-}
-
-my %hash = ( one => 1, two => 2);;
-ok(!access::readonly(%hash));
-
-ok(!access::readonly(%hash,1));
-
-ok(!access::readonly($hash{two},1));
-
-eval { $hash{'three'} = 3 };
-#warn "$@";
-ok($@ =~ /^Attempt to access key 'three' in fixed hash/);
-
-eval { print "# oops" if $hash{'four'}};
-#warn "$@";
-ok($@ =~ /^Attempt to access key 'four' in fixed hash/);
-
-eval { $hash{"\x{2323}"} = 3 };
-#warn "$@";
-ok($@ =~ /^Attempt to access key '(.*)' in fixed hash/);
-#ok(ord($1) == 0x2323);
-
-eval { delete $hash{'two'}};
-#warn "$@";
-ok($@);
-
-eval { delete $hash{'one'}};
-ok(not $@);
-
-ok($hash{two} == 2);
-
-eval { delete $hash{'four'}};
-#warn "$@";
-ok($@ =~ /^Attempt to access key 'four' in fixed hash/);
-
-ok(not exists $hash{'one'});
-
-ok(!exists $hash{'three'});
-
-ok(access::readonly(%hash,0));
-
-ok(!access::readonly(%hash));
-
-my $scalar = 1;
-ok(!access::readonly($scalar));
-
-ok(!access::readonly($scalar,1));
-
-eval { $scalar++ };
-#warn $@;
-ok($@ =~ /^Modification of a read-only value attempted/);
-
-ok(access::readonly($scalar,0));
-
-ok(!access::readonly($scalar));
-
-