defined @array and defined %hash need no warnings 'deprecated';
[p5sagit/p5-mst-13.2.git] / t / op / switch.t
index dcec866..80d6b98 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
 use strict;
 use warnings;
 
-plan tests => 127;
+plan tests => 128;
 
 # The behaviour of the feature pragma should be tested by lib/switch.t
 # using the tests in t/lib/switch/*. This file tests the behaviour of
@@ -413,6 +413,15 @@ sub check_outside1 { is($_, "outside", "\$_ lexically scoped") }
     is($ok, 'y', "Optimized-away comparison");
 }
 
+{
+    my $ok;
+    given(23) {
+        when (scalar 24) { $ok = 'n'; continue }
+        default { $ok = 'y' }
+    }
+    is($ok,'y','scalar()');
+}
+
 # File tests
 #  (How to be both thorough and portable? Pinch a few ideas
 #  from t/op/filetest.t. We err on the side of portability for