0.06
[gitmo/Moose-Autobox.git] / t / 005_string.t
index 1a33470..ef18efb 100644 (file)
@@ -3,14 +3,16 @@
 use strict;
 use warnings;
 
-use Test::More tests => 16;
+use Test::More tests => 20;
 use Test::Exception;
 
 BEGIN {
     use_ok('Moose::Autobox');
 }
 
-use autobox;
+use Moose::Autobox;
+
+my $VAR1; # for eval of dumps
 
 is('Hello World'->lc, 'hello world', '... $str->lc');
 is('Hello World'->uc, 'HELLO WORLD', '... $str->uc');
@@ -41,5 +43,13 @@ is('Hello World, Hello'->index('Hello'), 0, '... got the correct index');
 
 is('Hello World, Hello'->index('Hello', 6), 13, '... got the correct index');
 
-#is('Hello World, Hello'->rindex('World'), 13, '... got the correct right index');
-#diag CORE::rindex('Hello World, Hello', 'Hello');
+is('Hello World, Hello'->rindex('Hello'), 13, '... got the correct right index');
+
+is('Hello World, Hello'->rindex('Hello', 6), 0, '... got the correct right index');
+
+eval 'Hello World, Hello'->dump;
+is($VAR1, 'Hello World, Hello' , '... eval of &dump works');
+
+eval 'Hello World, Hello'->perl;
+is($VAR1, 'Hello World, Hello' , '... eval of &perl works');
+