You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2004/07/05 06:08:02 UTC
cvs commit: modperl-2.0/t/response/TestModperl pnotes.pm
stas 2004/07/04 21:08:02
Modified: t/response/TestModperl pnotes.pm
Log:
pnotes reset/deletion sub-tests
Revision Changes Path
1.3 +13 -1 modperl-2.0/t/response/TestModperl/pnotes.pm
Index: pnotes.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/pnotes.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- pnotes.pm 11 Apr 2002 11:08:44 -0000 1.2
+++ pnotes.pm 5 Jul 2004 04:08:02 -0000 1.3
@@ -13,7 +13,7 @@
sub handler {
my $r = shift;
- plan $r, tests => 5;
+ plan $r, tests => 9;
ok $r->pnotes;
@@ -29,6 +29,18 @@
ok t_cmp('pnotes_bar', $r->pnotes()->{'pnotes_foo'},
q{$r->pnotes()->{}});
+
+ # unset the entry (but the entry remains with undef value)
+ $r->pnotes('pnotes_foo', undef);
+ ok t_cmp($r->pnotes('pnotes_foo'), undef,
+ q{unset entry contents});
+ ok exists $r->pnotes->{'pnotes_foo'};
+
+ # now delete completely (possible only via the hash inteface)
+ delete $r->pnotes()->{'pnotes_foo'};
+ ok t_cmp($r->pnotes('pnotes_foo'), undef,
+ q{deleted entry contents});
+ ok !exists $r->pnotes->{'pnotes_foo'};
Apache::OK;
}