Merge branch 'smartmatch' into blead
[p5sagit/p5-mst-13.2.git] / t / op / smartmatch.t
index eb14bf0..a7a33f7 100644 (file)
@@ -6,6 +6,8 @@ BEGIN {
     require './test.pl';
 }
 use strict;
+use warnings;
+no warnings 'uninitialized';
 
 use Tie::Array;
 use Tie::Hash;
@@ -62,7 +64,13 @@ while (<DATA>) {
     my $tstr = "$left ~~ $right";
 
     test_again:
-    my $res = eval $tstr;
+    my $res;
+    if ($note =~ /NOWARNINGS/) {
+       $res = eval "no warnings; $tstr";
+    }
+    else {
+       $res = eval $tstr;
+    }
 
     chomp $@;
 
@@ -322,10 +330,6 @@ __DATA__
 !      $obj            @fooormore
        $obj            [sub{ref shift}]
 
-#  - works with lists instead of arrays
-       "foo"                   qw(foo bar)     TODO
-       "foo"                   ('foo','bar')   TODO
-
 #  - a regex
 =      qr/x/           [qw(foo bar baz quux)]
 =!     qr/y/           [qw(foo bar baz quux)]
@@ -368,7 +372,7 @@ __DATA__
 =      2               "2"
 =      2               "2.0"
 !      2               "2bananas"
-!=     2_3             "2_3"
+!=     2_3             "2_3"           NOWARNINGS
        FALSE           "0"
 
 # Regex against string
@@ -379,8 +383,6 @@ __DATA__
        12345           qr/3/
 !      12345           qr/7/
 
-# TODO ranges
-
 # array/hash against string
        @fooormore      "".\@fooormore
 !      @keyandmore     "".\@fooormore