summaryrefslogtreecommitdiff
path: root/perl/t/object.t
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-09-19 23:28:48 +0000
committerRuss Allbery <rra@stanford.edu>2007-09-19 23:28:48 +0000
commit94e80cab6d728120be83b4dec42d820c312ee6a5 (patch)
treed8cc170f4a6c274ba4157c1ce6aec2c1e33454b9 /perl/t/object.t
parenta5596f996b55be41659e32b6e5ec41d71d9c0d81 (diff)
Add generic attribute support to the object layer and update the API
documentation to talk about overriding it. Update some other bits of the API documentation to include more hints about how to handle overridden methods.
Diffstat (limited to 'perl/t/object.t')
-rwxr-xr-xperl/t/object.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl/t/object.t b/perl/t/object.t
index 73efbb7..a69101e 100755
--- a/perl/t/object.t
+++ b/perl/t/object.t
@@ -3,7 +3,7 @@
#
# t/object.t -- Tests for the basic object implementation.
-use Test::More tests => 125;
+use Test::More tests => 129;
use Wallet::ACL;
use Wallet::Config;
@@ -150,6 +150,12 @@ if ($object->flag_set ('locked', @trace)) {
is ($object->error, '', ' and setting it again works');
}
+# Attributes. Very boring.
+is ($object->attr ('foo'), undef, 'Retrieving an attribute fails');
+is ($object->error, 'unknown attribute foo', ' with the right error');
+is ($object->attr ('foo', [ 'foo' ], @trace), undef, ' and setting fails');
+is ($object->error, 'unknown attribute foo', ' with the right error');
+
# Test stub methods and locked status.
is ($object->store ("Some data", @trace), undef, 'Store fails');
is ($object->error, "cannot store keytab:${princ}: object is locked",