autogenerate API listing from comments in the source (from Benjamin
[p5sagit/p5-mst-13.2.git] / t / lib / fields.t
index 6f3ea5b..74be2c2 100755 (executable)
@@ -56,6 +56,14 @@ package Foo::Bar::Baz;
 use base 'Foo::Bar';
 use fields qw(foo bar baz);
 
+# Test repeatability for when modules get reloaded.
+package B1;
+use fields qw(b1 b2 b3);
+
+package D3;
+use base 'B2';
+use fields qw(b1 d1 _b1 _d1);  # hide b1
+
 package main;
 
 sub fstr
@@ -106,7 +114,7 @@ print "ok ", ++$testno, "\n";
 
 # We should get compile time failures field name typos
 eval q(my D3 $obj3 = $obj2; $obj3->{notthere} = "");
-print "not " unless $@ && $@ =~ /^No such field "notthere"/;
+print "not " unless $@ && $@ =~ /^No such pseudo-hash field "notthere"/;
 print "ok ", ++$testno, "\n";
 
 #fields::_dump();