Commit | Line | Data |
599cee73 |
1 | doio.c AOK |
2 | |
3 | Can't do bidirectional pipe |
4 | open(F, "| true |"); |
5 | |
06eaf0bc |
6 | Missing command in piped open |
7 | open(F, "| "); |
8 | |
9 | Missing command in piped open |
10 | open(F, " |"); |
11 | |
599cee73 |
12 | warn(warn_nl, "open"); |
13 | open(F, "true\ncd") |
14 | |
15 | Close on unopened file <%s> |
16 | $a = "fred";close($a) |
17 | |
18 | tell() on unopened file |
19 | $a = "fred";$a = tell($a) |
20 | |
21 | seek() on unopened file |
22 | $a = "fred";$a = seek($a,1,1) |
23 | |
24 | sysseek() on unopened file |
25 | $a = "fred";$a = seek($a,1,1) |
26 | |
27 | warn(warn_uninit); |
28 | print $a ; |
29 | |
30 | Stat on unopened file <%s> |
31 | close STDIN ; -x STDIN ; |
32 | |
33 | warn(warn_nl, "stat"); |
34 | stat "ab\ncd" |
35 | |
36 | warn(warn_nl, "lstat"); |
37 | lstat "ab\ncd" |
38 | |
39 | Can't exec \"%s\": %s |
40 | |
41 | Can't exec \"%s\": %s |
42 | |
43 | |
0453d815 |
44 | Mandatory Warnings ALL TODO |
45 | ------------------ |
46 | Can't do inplace edit: %s is not a regular file |
47 | edit a directory |
48 | |
49 | Can't do inplace edit: %s would not be unique |
50 | Can't rename %s to %s: %s, skipping file |
51 | Can't rename %s to %s: %s, skipping file |
52 | Can't remove %s: %s, skipping file |
53 | Can't do inplace edit on %s: %s |
54 | |
55 | |
599cee73 |
56 | __END__ |
57 | # doio.c |
58 | use warning 'io' ; |
3eeba6fb |
59 | open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|"); |
60 | close(F); |
0453d815 |
61 | no warning 'io' ; |
62 | open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|"); |
63 | close(G); |
599cee73 |
64 | EXPECT |
65 | Can't do bidirectional pipe at - line 3. |
66 | ######## |
67 | # doio.c |
68 | use warning 'io' ; |
0453d815 |
69 | open(F, "| "); |
70 | no warning 'io' ; |
71 | open(G, "| "); |
06eaf0bc |
72 | EXPECT |
73 | Missing command in piped open at - line 3. |
74 | ######## |
75 | # doio.c |
76 | use warning 'io' ; |
0453d815 |
77 | open(F, " |"); |
78 | no warning 'io' ; |
79 | open(G, " |"); |
06eaf0bc |
80 | EXPECT |
81 | Missing command in piped open at - line 3. |
82 | ######## |
83 | # doio.c |
84 | use warning 'io' ; |
0453d815 |
85 | open(F, "<true\ncd"); |
86 | no warning 'io' ; |
87 | open(G, "<true\ncd"); |
599cee73 |
88 | EXPECT |
89 | Unsuccessful open on filename containing newline at - line 3. |
90 | ######## |
91 | # doio.c |
92 | use warning 'io' ; |
93 | close STDIN ; |
94 | tell(STDIN); |
95 | $a = seek(STDIN,1,1); |
96 | $a = sysseek(STDIN,1,1); |
97 | -x STDIN ; |
0453d815 |
98 | no warning 'io' ; |
99 | close STDIN ; |
100 | tell(STDIN); |
101 | $a = seek(STDIN,1,1); |
102 | $a = sysseek(STDIN,1,1); |
103 | -x STDIN ; |
599cee73 |
104 | EXPECT |
105 | tell() on unopened file at - line 4. |
106 | seek() on unopened file at - line 5. |
107 | sysseek() on unopened file at - line 6. |
108 | Stat on unopened file <STDIN> at - line 7. |
109 | ######## |
110 | # doio.c |
111 | use warning 'uninitialized' ; |
112 | print $a ; |
0453d815 |
113 | no warning 'uninitialized' ; |
114 | print $b ; |
599cee73 |
115 | EXPECT |
116 | Use of uninitialized value at - line 3. |
117 | ######## |
118 | # doio.c |
119 | use warning 'io' ; |
120 | |
121 | EXPECT |
122 | |
123 | ######## |
124 | # doio.c |
125 | use warning 'io' ; |
126 | stat "ab\ncd"; |
127 | lstat "ab\ncd"; |
0453d815 |
128 | no warning 'io' ; |
129 | stat "ab\ncd"; |
130 | lstat "ab\ncd"; |
599cee73 |
131 | EXPECT |
132 | Unsuccessful stat on filename containing newline at - line 3. |
133 | Unsuccessful stat on filename containing newline at - line 4. |
134 | ######## |
135 | # doio.c |
136 | use warning 'io' ; |
dfe13c55 |
137 | exec "lskdjfalksdjfdjfkls","" ; |
0453d815 |
138 | no warning 'io' ; |
139 | exec "lskdjfalksdjfdjfkls","" ; |
599cee73 |
140 | EXPECT |
e5e1b98b |
141 | OPTION regex |
c4f6c246 |
142 | Can't exec "lskdjfalksdjfdjfkls": .+ |
599cee73 |
143 | ######## |
144 | # doio.c |
145 | use warning 'io' ; |
146 | exec "lskdjfalksdjfdjfkls", "abc" ; |
0453d815 |
147 | no warning 'io' ; |
148 | exec "lskdjfalksdjfdjfkls", "abc" ; |
599cee73 |
149 | EXPECT |
e5e1b98b |
150 | OPTION regex |
3eeba6fb |
151 | Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+ |
0453d815 |
152 | ######## |
153 | # doio.c |
154 | $^W = 0 ; |
155 | my $filename = "./temp" ; |
156 | mkdir $filename, 0777 |
157 | or die "Cannot create directory $filename: $!\n" ; |
158 | { |
159 | local (@ARGV) = ($filename) ; |
160 | local ($^I) = "" ; |
161 | my $x = <> ; |
162 | } |
163 | { |
164 | no warning 'inplace' ; |
165 | local (@ARGV) = ($filename) ; |
166 | local ($^I) = "" ; |
167 | my $x = <> ; |
168 | } |
169 | { |
170 | use warning 'inplace' ; |
171 | local (@ARGV) = ($filename) ; |
172 | local ($^I) = "" ; |
173 | my $x = <> ; |
174 | } |
175 | rmdir $filename ; |
176 | EXPECT |
177 | Can't do inplace edit: ./temp is not a regular file at - line 9. |
178 | Can't do inplace edit: ./temp is not a regular file at - line 21. |
179 | |