Once more unto resync
[p5sagit/p5-mst-13.2.git] / t / pragma / warn / 6default
CommitLineData
0453d815 1Check default warnings
2
3__END__
4438c4b7 4# default warnings should be displayed if you don't add anything
0453d815 5# optional shouldn't
6my $a = oct "7777777777777777777777777777777777779" ;
7EXPECT
8Integer overflow in octal number at - line 3.
9########
4438c4b7 10# no warnings should be displayed
11no warnings ;
9e24b6e2 12my $a = oct "7777777777777777777777777777777777778" ;
0453d815 13EXPECT
14########
4438c4b7 15# all warnings should be displayed
16use warnings ;
9e24b6e2 17my $a = oct "7777777777777777777777777777777777778" ;
0453d815 18EXPECT
9e24b6e2 19Integer overflow in octal number at - line 3.
20Illegal octal digit '8' ignored at - line 3.
21Octal number > 037777777777 non-portable at - line 3.
0453d815 22########
23# check scope
4438c4b7 24use warnings ;
9e24b6e2 25my $a = oct "7777777777777777777777777777777777778" ;
0453d815 26{
4438c4b7 27 no warnings ;
9e24b6e2 28 my $a = oct "7777777777777777777777777777777777778" ;
0453d815 29}
9e24b6e2 30my $c = oct "7777777777777777777777777777777777778" ;
0453d815 31EXPECT
9e24b6e2 32Integer overflow in octal number at - line 3.
33Illegal octal digit '8' ignored at - line 3.
34Octal number > 037777777777 non-portable at - line 3.
0453d815 35Integer overflow in octal number at - line 8.
9e24b6e2 36Illegal octal digit '8' ignored at - line 8.
37Octal number > 037777777777 non-portable at - line 8.
38########
4438c4b7 39# all warnings should be displayed
40use warnings ;
9e24b6e2 41my $a = oct "0xfffffffffffffffffg" ;
42EXPECT
43Integer overflow in hexadecimal number at - line 3.
44Illegal hexadecimal digit 'g' ignored at - line 3.
45Hexadecimal number > 0xffffffff non-portable at - line 3.
46########
4438c4b7 47# all warnings should be displayed
48use warnings ;
9e24b6e2 49my $a = oct "0b111111111111111111111111111111111111111111111111111111111111111112";
50EXPECT
51Integer overflow in binary number at - line 3.
52Illegal binary digit '2' ignored at - line 3.
53Binary number > 0b11111111111111111111111111111111 non-portable at - line 3.