summaryrefslogtreecommitdiff
path: root/t/pragma/warn/pp
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-08-29 10:18:59 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-29 10:18:59 +0000
commit4438c4b75b842b6c829a7da9841e97abb875b1d8 (patch)
tree559b1a700465df1cb1ae02ada9b9c9e48dd9539f /t/pragma/warn/pp
parent6dd159d1401b9b9973dd00c1235374efbcb27144 (diff)
downloadperl-4438c4b75b842b6c829a7da9841e97abb875b1d8.tar.gz
Rename warning to warnings, from Paul Marquess.
p4raw-id: //depot/cfgperl@4038
Diffstat (limited to 't/pragma/warn/pp')
-rw-r--r--t/pragma/warn/pp34
1 files changed, 17 insertions, 17 deletions
diff --git a/t/pragma/warn/pp b/t/pragma/warn/pp
index 9baf9c14b0..48b5ec86b5 100644
--- a/t/pragma/warn/pp
+++ b/t/pragma/warn/pp
@@ -34,44 +34,44 @@
__END__
# pp.c
-use warning 'substr' ;
+use warnings 'substr' ;
$a = "ab" ;
$a = substr($a, 4,5);
-no warning 'substr' ;
+no warnings 'substr' ;
$a = "ab" ;
$a = substr($a, 4,5);
EXPECT
substr outside of string at - line 4.
########
# pp.c
-use warning 'substr' ;
+use warnings 'substr' ;
$a = "ab" ;
$b = \$a ;
substr($b, 1,1) = "ab" ;
-no warning 'substr' ;
+no warnings 'substr' ;
substr($b, 1,1) = "ab" ;
EXPECT
Attempt to use reference as lvalue in substr at - line 5.
########
# pp.c
-use warning 'uninitialized' ;
+use warnings 'uninitialized' ;
# TODO
EXPECT
########
# pp.c
-use warning 'unsafe' ;
+use warnings 'unsafe' ;
my $a = { 1,2,3};
-no warning 'unsafe' ;
+no warnings 'unsafe' ;
my $b = { 1,2,3};
EXPECT
Odd number of elements in hash assignment at - line 3.
########
# pp.c
-use warning 'unsafe' ;
+use warnings 'unsafe' ;
my @a = unpack ("A,A", "22") ;
my $a = pack ("A,A", 1,2) ;
-no warning 'unsafe' ;
+no warnings 'unsafe' ;
my @b = unpack ("A,A", "22") ;
my $b = pack ("A,A", 1,2) ;
EXPECT
@@ -79,27 +79,27 @@ Invalid type in unpack: ',' at - line 3.
Invalid type in pack: ',' at - line 4.
########
# pp.c
-use warning 'uninitialized' ;
+use warnings 'uninitialized' ;
my $a = undef ;
my $b = $$a;
-no warning 'uninitialized' ;
+no warnings 'uninitialized' ;
my $c = $$a;
EXPECT
Use of uninitialized value at - line 4.
########
# pp.c
-use warning 'unsafe' ;
+use warnings 'unsafe' ;
sub foo { my $a = "a"; return $a . $a++ . $a++ }
my $a = pack("p", &foo) ;
-no warning 'unsafe' ;
+no warnings 'unsafe' ;
my $b = pack("p", &foo) ;
EXPECT
Attempt to pack pointer to temporary value at - line 4.
########
# pp.c
-use warning 'unsafe' ;
+use warnings 'unsafe' ;
bless \[], "" ;
-no warning 'unsafe' ;
+no warnings 'unsafe' ;
bless \[], "" ;
EXPECT
Explicit blessing to '' (assuming package main) at - line 3.
@@ -112,11 +112,11 @@ EXPECT
Malformed UTF-8 character at - line 4.
########
# pp.c
-use warning 'utf8' ;
+use warnings 'utf8' ;
use utf8 ;
$_ = "\x80 \xff" ;
reverse ;
-no warning 'utf8' ;
+no warnings 'utf8' ;
$_ = "\x80 \xff" ;
reverse ;
EXPECT