summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-04-08 10:14:23 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-04-08 10:14:23 +0000
commit55847c3f91985e4ba5e6b937d50b814fccd89d02 (patch)
treeb77b2959093c2a72a19220770bae6a28535af491 /t
parent8e2329934bcca9c59680f6d478c3c2bc3ef7c649 (diff)
parent67991998447f30fcd8fa1029739f34af5e84cded (diff)
downloadperl-55847c3f91985e4ba5e6b937d50b814fccd89d02.tar.gz
Integrate mainline
p4raw-id: //depot/perlio@9625
Diffstat (limited to 't')
-rw-r--r--t/lib/peek.t2
-rwxr-xr-xt/op/array.t15
-rwxr-xr-xt/op/tr.t11
-rw-r--r--t/pragma/warn/sv17
4 files changed, 42 insertions, 3 deletions
diff --git a/t/lib/peek.t b/t/lib/peek.t
index 7bf1793acb..96e24a2e4f 100644
--- a/t/lib/peek.t
+++ b/t/lib/peek.t
@@ -171,7 +171,7 @@ do_test(12,
IV = 1
NV = 0
ARRAY = $ADDR \\(0:7, 1:1\\)
- hash quality = 150.0%
+ hash quality = 100.0%
KEYS = 1
FILL = 1
MAX = 7
diff --git a/t/op/array.t b/t/op/array.t
index d48b5fbfa0..472e02cd35 100755
--- a/t/op/array.t
+++ b/t/op/array.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..71\n";
+print "1..72\n";
#
# @foo, @bar, and @ary are also used from tie-stdarray after tie-ing them
@@ -234,3 +234,16 @@ sub foo { "a" }
@foo=(foo())[0,0];
$foo[1] eq "a" or print "not ";
print "ok 71\n";
+
+# $[ should have the same effect regardless of whether the aelem
+# op is optimized to aelemfast.
+
+sub tary {
+ local $[ = 10;
+ my $five = 5;
+ print "not " unless $tary[5] == $tary[$five];
+ print "ok 72\n";
+}
+
+@tary = (0..50);
+tary();
diff --git a/t/op/tr.t b/t/op/tr.t
index 90b03706e2..7c73430687 100755
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..67\n";
+print "1..69\n";
$_ = "abcdefghijklmnopqrstuvwxyz";
@@ -376,3 +376,12 @@ print "ok 66\n";
print "not " if hex($a) != 1;
print "ok 67\n";
+# From Inaba Hiroto
+@a = (1,2); map { y/1/./ for $_ } @a;
+print "not " if "@a" ne ". 2";
+print "ok 68\n";
+
+@a = (1,2); map { y/1/./ for $_.'' } @a;
+print "not " if "@a" ne "1 2";
+print "ok 69\n";
+
diff --git a/t/pragma/warn/sv b/t/pragma/warn/sv
index 2409589a8f..b3929e2210 100644
--- a/t/pragma/warn/sv
+++ b/t/pragma/warn/sv
@@ -226,6 +226,23 @@ EXPECT
Argument "def" isn't numeric in bitwise and (&) at - line 3.
########
# sv.c
+use warnings 'numeric' ;
+my $x = pack i => "def" ;
+no warnings 'numeric' ;
+my $z = pack i => "def" ;
+EXPECT
+Argument "def" isn't numeric in pack at - line 3.
+########
+# sv.c
+use warnings 'numeric' ;
+my $a = "d\0f" ;
+my $x = 1 + $a ;
+no warnings 'numeric' ;
+my $z = 1 + $a ;
+EXPECT
+Argument "d\0f" isn't numeric in addition (+) at - line 4.
+########
+# sv.c
use warnings 'redefine' ;
sub fred {}
sub joe {}