This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: Fix grammar
[perl5.git] / t / lib / warnings / perlio
1   perlio.c 
2
3
4   Mandatory Warnings ALL TODO
5   ------------------
6     Setting cnt to %d
7     Setting ptr %p > end+1 %p
8     Setting cnt to %d, ptr implies %d
9
10
11 Invalid separator character %c%c%c in PerlIO layer specification %s
12
13     open(F, ">:-aa", "bb")
14
15
16 Argument list not closed for PerlIO layer \"%.*s\""
17
18     open(F, ">:aa(", "bb")
19
20 Unknown PerlIO layer \"%.*s\"
21
22     # PerlIO/xyz.pm has 1;
23     open(F, ">xyz", "bb")
24
25 __END__
26
27 # perlio [PerlIO_parse_layers]
28 no warnings 'layer';
29 open(F, ">:-aa", "bb");
30 use warnings 'layer';
31 open(F, ">:-aa", "bb");
32 close F;
33 EXPECT
34 Invalid separator character '-' in PerlIO layer specification -aa at - line 6.
35 ########
36
37 # perlio [PerlIO_parse_layers]
38 no warnings 'layer';
39 open(F, ">:aa(", "bb");
40 use warnings 'layer';
41 open(F, ">:aa(", "bb");
42 close F;
43 EXPECT
44 Argument list not closed for PerlIO layer "aa(" at - line 6.
45 ########
46
47 --FILE-- PerlIO_test_dir/xyz.pm
48 1;
49 --FILE--
50 # perlio [PerlIO_parse_layers]
51 no warnings 'layer';
52 open(F, ">:xyz", "bb");
53 use warnings 'layer';
54 open(F, ">:xyz", "bb");
55 close F;
56 END { 1 while unlink "bb" } # KEEP THIS WITH THE LAST TEST.
57 EXPECT
58 Unknown PerlIO layer "xyz" at - line 5.
59 ########
60 # NAME :win32 experimental warning
61 # SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
62 open my $fh, ">:win32", "temp.txt" or die $^E;
63 END { unlink "temp.txt"; }
64 EXPECT
65 PerlIO layer ':win32' is experimental at - line 1.
66 ########
67 # NAME :win32 experimental warning disabled
68 # SKIP ?$^O ne "MSWin32" && ":win32 only available on Win32"
69 no warnings "experimental::win32_perlio";
70 open my $fh, ">:win32", "temp.txt" or die $^E;
71 END { unlink "temp.txt"; }
72 EXPECT