From 94e80cab6d728120be83b4dec42d820c312ee6a5 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 19 Sep 2007 23:28:48 +0000 Subject: 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. --- perl/t/object.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'perl/t/object.t') 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", -- cgit v1.2.3