summaryrefslogtreecommitdiff
path: root/t/op/smartmatch.t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-23 17:17:03 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-03-23 17:23:37 +0100
commita566f585deae885dd3accdc93186eed7bf302b77 (patch)
tree04ed0626b10d30526041bdce10b661b288a7927f /t/op/smartmatch.t
parentb0138e9991650fb38f2b288d28e609063075258b (diff)
downloadperl-a566f585deae885dd3accdc93186eed7bf302b77.tar.gz
Make ~~ qr// non-commutative
Pass elements in correct order to the sub-smart-match when comparing two arrays. And more tests
Diffstat (limited to 't/op/smartmatch.t')
-rw-r--r--t/op/smartmatch.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/op/smartmatch.t b/t/op/smartmatch.t
index 9511acc92c..8123246572 100644
--- a/t/op/smartmatch.t
+++ b/t/op/smartmatch.t
@@ -275,7 +275,8 @@ __DATA__
# - another array ref
[] []
! [] [1]
- [["foo"], ["bar"]] [qr/o/, qr/a/]
+! [["foo"], ["bar"]] [qr/o/, qr/a/]
+ [["foo"], ["bar"]] [qr/ARRAY/, qr/ARRAY/]
["foo", "bar"] [qr/o/, qr/a/]
! ["foo", "bar"] [qr/o/, "foo"]
$deep1 $deep1
@@ -313,8 +314,8 @@ __DATA__
FALSE "0"
# Regex against string
- qr/x/ "x"
-! qr/y/ "x"
+ "x" qr/x/
+! "x" qr/y/
# Regex against number
12345 qr/3/