generate README at dist built time rather than configure time
[p5sagit/Class-Accessor-Grouped.git] / t / accessors_wo.t
index 39c5d7a..e801118 100644 (file)
@@ -1,8 +1,8 @@
-use Test::More tests => 46;
+use Test::More;
 use Test::Exception;
 use strict;
 use warnings;
-use Config;
+no warnings 'once';
 use lib 't/lib';
 
 # we test the pure-perl versions only, but allow overrides
@@ -52,7 +52,7 @@ my $test_accessors = {
     custom_field => "lr2'field",
   },
   fieldname_torture => {
-    custom_field => join ('', map { chr($_) } (1..255) ), # FIXME after RT#80569 is fixed 0..255 should work
+    custom_field => join ('', map { chr($_) } (0..255) ),
     is_xs => $use_xs,
   },
 };
@@ -77,19 +77,16 @@ for my $name (sort keys %$test_accessors) {
 
   my $wo_regex = $test_accessors->{$name}{is_xs}
     ? qr/Usage\:.+$name.*\(self, newvalue\)/
-    : qr/cannot access the value of '\Q$field\E'/
+    : qr/$name(:?_accessor)?\Q' cannot access its value (write-only attribute of class AccessorGroupsWO)/
   ;
 
   # die on get via name/alias
-  {
-    local $TODO = "Class::XSAccessor emits broken error messages on 5.10 or -DDEBUGGING 5.8"
-      if (
-        $test_accessors->{$name}{is_xs}
-          and
-        $] < '5.011'
-          and
-        ( $] > '5.009' or $Config{config_args} =~ /DEBUGGING/ )
-      );
+  SKIP: {
+    skip "Class::XSAccessor emits broken error messages on 5.10 and earlier", 1 if (
+      $test_accessors->{$name}{is_xs}
+        and
+      $] < '5.011'
+    );
 
     throws_ok {
       $obj->$name;
@@ -101,5 +98,4 @@ for my $name (sort keys %$test_accessors) {
   }
 };
 
-# important
-1;
\ No newline at end of file
+done_testing unless $::SUBTESTING;