add travis config
[p5sagit/Eval-WithLexicals.git] / t / simple.t
index 22ea7c4..e8157ba 100644 (file)
@@ -33,4 +33,18 @@ is_deeply(
   'Inner scope and other lexical ok'
 );
 
+is_deeply(
+  [ keys %{$eval->lexicals} ],
+  [ '$x' ],
+  'No capture of invisible $y'
+);
+
+$eval->eval('my $y = sub { $_[0]+1 }');
+
+is_deeply(
+  [ $eval->eval('$y->(2)') ],
+  [ 3 ],
+  'Sub created ok'
+);
+
 done_testing;