Some kind of fix or workaround for phaylon's parameterized role bug in MXD.
[p5sagit/Devel-Declare.git] / t / quote.t
index 2f2e930..921cc94 100644 (file)
--- a/t/quote.t
+++ b/t/quote.t
@@ -1,22 +1,14 @@
 use strict;
 use warnings;
-use Test::More tests => 14;
+use Test::More tests => 15;
 
 use Devel::Declare 'method' => sub {};
+use File::Spec;
 
 sub test_eval;
 
-TODO: {
-    local $TODO = "dd_ck_const doesn't special-case ops created in quotelike contexts";
-    test_eval 'qr/method/';
+QUOTE: {
     test_eval 'qq/method/';
-    test_eval '/method/';
-    test_eval 's/method//';
-    test_eval '`method`';
-    test_eval 'qx/method/';
-    test_eval 'tr/method/METHOD/';
-
-    # these ones work OK
     test_eval 'q/method/';
     test_eval "'method'";
     test_eval '"method"';
@@ -24,7 +16,24 @@ TODO: {
     test_eval '<<method;
 tum ti tum
 method';
-    test_eval 'no warnings "reserved"; open method, "</dev/null"';
+    test_eval 'my $x = { method => 42 }';
+}
+
+SYSTEM: {
+    test_eval 'sub {`method`}'; # compiled to prevent calling arbitrary exe!
+    test_eval 'sub { qx{method} }';
+}
+
+REGEX: {
+    local $_=''; # the passing results will act on $_
+    test_eval 'qr/method/';
+    test_eval '/method/';
+    test_eval 's/method//';
+    test_eval 'tr/method/METHOD/';
+}
+
+FILE: {
+    test_eval q{ no warnings 'reserved'; open method, '<', File::Spec->devnull };
     test_eval '<method>';
 }