Deprecate _default_is and _default_default for native traits.
[gitmo/Moose.git] / t / 100_bugs / 019_moose_octal_defaults.t
index ddb9ab1..a05a170 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
-use Test::More qw(no_plan);
+use Test::More;
 
 {
     my $package = qq{
@@ -33,7 +33,7 @@ use lib qw(lib);
 has id => (
     isa     => 'Str',
     is      => 'ro',
-    default => 017600, 
+    default => 017600,
 );
 
 no Moose;
@@ -56,7 +56,7 @@ use lib qw(lib);
 has id => (
     isa     => 'Str',
     is      => 'ro',
-    default => 0xFF,  
+    default => 0xFF,
 );
 
 no Moose;
@@ -79,7 +79,7 @@ use lib qw(lib);
 has id => (
     isa     => 'Str',
     is      => 'ro',
-    default => '0xFF',  
+    default => '0xFF',
 );
 
 no Moose;
@@ -91,4 +91,29 @@ __PACKAGE__->meta->make_immutable;
     $@ ? ::fail($@) : ::pass('017600 octal default works');
     my $obj = Test::Moose::Go::Boom4->new;
     ::is( $obj->id, '0xFF', 'value is still the same' );
-}
\ No newline at end of file
+}
+
+{
+    my $package = qq{
+package Test::Moose::Go::Boom5;
+use Moose;
+use lib qw(lib);
+
+has id => (
+    isa     => 'Str',
+    is      => 'ro',
+    default => '0 but true',
+);
+
+no Moose;
+
+__PACKAGE__->meta->make_immutable;
+};
+
+    eval $package;
+    $@ ? ::fail($@) : ::pass('017600 octal default works');
+    my $obj = Test::Moose::Go::Boom5->new;
+    ::is( $obj->id, '0 but true', 'value is still the same' );
+}
+
+done_testing;