blob: be45c777778a51a7f4eb4d9d5d575a380a0879d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Check default warnings
__END__
# default warning should be displayed if you don't add anything
# optional shouldn't
my $a = oct "7777777777777777777777777777777777779" ;
EXPECT
Integer overflow in octal number at - line 3.
########
# no warning should be displayed
no warning ;
my $a = oct "7777777777777777777777777777777777779" ;
EXPECT
Integer overflow in octal number at - line 3.
########
# all warning should be displayed
use warning ;
my $a = oct "77777777797";
EXPECT
Illegal octal digit '9' ignored at - line 3.
########
# check scope
use warning ;
my $a = oct "77777777797";
{
no warning ;
my $b = oct "77777777797";
}
my $c = oct "7777777777777777777777777777777777779" ;
EXPECT
Illegal octal digit '9' ignored at - line 3.
Octal number > 037777777777 non-portable at - line 8.
Integer overflow in octal number at - line 8.
|