Commit | Line | Data |
---|---|---|
c0222185 RGS |
1 | #!./perl |
2 | # Tests to ensure that we don't unexpectedly change prototypes of builtins | |
3 | ||
f26e2faa JH |
4 | BEGIN { |
5 | chdir 't' if -d 't'; | |
6 | @INC = '../lib'; | |
7 | } | |
8 | ||
0e7f5727 | 9 | BEGIN { require './test.pl'; } |
f988db8c | 10 | plan tests => 245; |
0e7f5727 | 11 | |
c0222185 RGS |
12 | while (<DATA>) { |
13 | chomp; | |
59b085e1 | 14 | (my $keyword, my $proto, local $TODO) = split " ", $_, 3; |
c0222185 RGS |
15 | if ($proto eq 'undef') { |
16 | ok( !defined prototype "CORE::".$keyword, $keyword ); | |
17 | } | |
18 | elsif ($proto eq 'unknown') { | |
19 | eval { prototype "CORE::".$keyword }; | |
20 | like( $@, qr/Can't find an opnumber for/, $keyword ); | |
21 | } | |
22 | else { | |
23 | is( "(".prototype("CORE::".$keyword).")", $proto, $keyword ); | |
24 | } | |
25 | } | |
26 | ||
27 | # the keyword list : | |
28 | ||
29 | __DATA__ | |
7c4c6e7c FC |
30 | __FILE__ () |
31 | __LINE__ () | |
32 | __PACKAGE__ () | |
d3dc34ae FC |
33 | __DATA__ undef |
34 | __END__ undef | |
d673215e | 35 | CORE unknown |
59b085e1 | 36 | abs (_) |
c0222185 | 37 | accept (**) |
59b085e1 | 38 | alarm (_) |
95f7e41f | 39 | and undef |
c0222185 RGS |
40 | atan2 ($$) |
41 | bind (*$) | |
42 | binmode (*;$) | |
43 | bless ($;$) | |
f988db8c | 44 | break () |
c0222185 RGS |
45 | caller (;$) |
46 | chdir (;$) | |
47 | chmod (@) | |
48 | chomp undef | |
49 | chop undef | |
50 | chown (@) | |
59b085e1 RGS |
51 | chr (_) |
52 | chroot (_) | |
c0222185 RGS |
53 | close (;*) |
54 | closedir (*) | |
95f7e41f | 55 | cmp undef |
c0222185 | 56 | connect (*$) |
0d863452 | 57 | continue () |
59b085e1 | 58 | cos (_) |
c0222185 RGS |
59 | crypt ($$) |
60 | dbmclose (\%) | |
61 | dbmopen (\%$$) | |
d3dc34ae | 62 | default undef |
c0222185 RGS |
63 | defined undef |
64 | delete undef | |
65 | die (@) | |
66 | do undef | |
67 | dump () | |
cba5a3b0 | 68 | each (+) |
c0222185 RGS |
69 | else undef |
70 | elsif undef | |
71 | endgrent () | |
72 | endhostent () | |
73 | endnetent () | |
74 | endprotoent () | |
75 | endpwent () | |
76 | endservent () | |
77 | eof (;*) | |
95f7e41f | 78 | eq undef |
c0222185 RGS |
79 | eval undef |
80 | exec undef | |
81 | exists undef | |
82 | exit (;$) | |
59b085e1 | 83 | exp (_) |
c0222185 RGS |
84 | fcntl (*$$) |
85 | fileno (*) | |
86 | flock (*$) | |
87 | for undef | |
88 | foreach undef | |
89 | fork () | |
90 | format undef | |
91 | formline ($@) | |
95f7e41f | 92 | ge undef |
c0222185 RGS |
93 | getc (;*) |
94 | getgrent () | |
95 | getgrgid ($) | |
96 | getgrnam ($) | |
97 | gethostbyaddr ($$) | |
98 | gethostbyname ($) | |
99 | gethostent () | |
100 | getlogin () | |
101 | getnetbyaddr ($$) | |
102 | getnetbyname ($) | |
103 | getnetent () | |
104 | getpeername (*) | |
105 | getpgrp (;$) | |
106 | getppid () | |
107 | getpriority ($$) | |
108 | getprotobyname ($) | |
dcbdef25 | 109 | getprotobynumber ($;) |
c0222185 RGS |
110 | getprotoent () |
111 | getpwent () | |
112 | getpwnam ($) | |
113 | getpwuid ($) | |
114 | getservbyname ($$) | |
115 | getservbyport ($$) | |
116 | getservent () | |
117 | getsockname (*) | |
118 | getsockopt (*$$) | |
5458a98a | 119 | given undef |
c0222185 RGS |
120 | glob undef |
121 | gmtime (;$) | |
122 | goto undef | |
123 | grep undef | |
95f7e41f | 124 | gt undef |
59b085e1 | 125 | hex (_) |
c0222185 RGS |
126 | if undef |
127 | index ($$;$) | |
59b085e1 | 128 | int (_) |
c0222185 RGS |
129 | ioctl (*$$) |
130 | join ($@) | |
cba5a3b0 | 131 | keys (+) |
c0222185 RGS |
132 | kill (@) |
133 | last undef | |
59b085e1 RGS |
134 | lc (_) |
135 | lcfirst (_) | |
95f7e41f | 136 | le undef |
59b085e1 | 137 | length (_) |
c0222185 RGS |
138 | link ($$) |
139 | listen (*$) | |
140 | local undef | |
141 | localtime (;$) | |
f79aa60b | 142 | lock (\[$@%&*]) |
59b085e1 | 143 | log (_) |
465bc0f5 | 144 | lstat (;*) |
95f7e41f | 145 | lt undef |
c0222185 RGS |
146 | m undef |
147 | map undef | |
d116c547 | 148 | mkdir (_;$) |
c0222185 RGS |
149 | msgctl ($$$) |
150 | msgget ($$) | |
151 | msgrcv ($$$$$) | |
152 | msgsnd ($$$) | |
153 | my undef | |
95f7e41f | 154 | ne undef |
c0222185 RGS |
155 | next undef |
156 | no undef | |
dcbdef25 | 157 | not ($;) |
59b085e1 | 158 | oct (_) |
c0222185 RGS |
159 | open (*;$@) |
160 | opendir (*$) | |
95f7e41f | 161 | or undef |
59b085e1 | 162 | ord (_) |
c0222185 RGS |
163 | our undef |
164 | pack ($@) | |
165 | package undef | |
166 | pipe (**) | |
cba5a3b0 | 167 | pop (;+) |
c0222185 RGS |
168 | pos undef |
169 | print undef | |
170 | printf undef | |
171 | prototype undef | |
cba5a3b0 | 172 | push (+@) |
c0222185 RGS |
173 | q undef |
174 | qq undef | |
175 | qr undef | |
59b085e1 | 176 | quotemeta (_) |
c0222185 RGS |
177 | qw undef |
178 | qx undef | |
179 | rand (;$) | |
180 | read (*\$$;$) | |
181 | readdir (*) | |
182 | readline (;*) | |
59b085e1 | 183 | readlink (_) |
01f5bc1b | 184 | readpipe (_) |
c0222185 RGS |
185 | recv (*\$$$) |
186 | redo undef | |
59b085e1 | 187 | ref (_) |
c0222185 RGS |
188 | rename ($$) |
189 | require undef | |
190 | reset (;$) | |
191 | return undef | |
192 | reverse (@) | |
193 | rewinddir (*) | |
194 | rindex ($$;$) | |
59b085e1 | 195 | rmdir (_) |
c0222185 | 196 | s undef |
e3e804c9 | 197 | say undef |
c0222185 RGS |
198 | scalar undef |
199 | seek (*$$) | |
200 | seekdir (*$) | |
7391a163 | 201 | select undef |
c0222185 RGS |
202 | semctl ($$$$) |
203 | semget ($$$) | |
204 | semop ($$) | |
205 | send (*$$;$) | |
206 | setgrent () | |
207 | sethostent ($) | |
208 | setnetent ($) | |
bdf1bb36 | 209 | setpgrp (;$$) |
c0222185 RGS |
210 | setpriority ($$$) |
211 | setprotoent ($) | |
212 | setpwent () | |
213 | setservent ($) | |
214 | setsockopt (*$$$) | |
cba5a3b0 | 215 | shift (;+) |
c0222185 RGS |
216 | shmctl ($$$) |
217 | shmget ($$$) | |
218 | shmread ($$$$) | |
219 | shmwrite ($$$$) | |
220 | shutdown (*$) | |
59b085e1 | 221 | sin (_) |
c0222185 RGS |
222 | sleep (;$) |
223 | socket (*$$$) | |
224 | socketpair (**$$$) | |
225 | sort undef | |
cba5a3b0 | 226 | splice (+;$$@) |
c0222185 RGS |
227 | split undef |
228 | sprintf ($@) | |
59b085e1 | 229 | sqrt (_) |
c0222185 | 230 | srand (;$) |
465bc0f5 | 231 | stat (;*) |
5458a98a | 232 | state undef |
c0222185 RGS |
233 | study undef |
234 | sub undef | |
235 | substr ($$;$$) | |
236 | symlink ($$) | |
237 | syscall ($@) | |
238 | sysopen (*$$;$) | |
239 | sysread (*\$$;$) | |
240 | sysseek (*$$) | |
241 | system undef | |
242 | syswrite (*$;$$) | |
243 | tell (;*) | |
244 | telldir (*) | |
1db4d195 FC |
245 | tie (\[$@%*]$@) |
246 | tied (\[$@%*]) | |
c0222185 RGS |
247 | time () |
248 | times () | |
249 | tr undef | |
250 | truncate ($$) | |
59b085e1 RGS |
251 | uc (_) |
252 | ucfirst (_) | |
c0222185 RGS |
253 | umask (;$) |
254 | undef undef | |
255 | unless undef | |
256 | unlink (@) | |
ea5703f4 | 257 | unpack ($_) |
cba5a3b0 | 258 | unshift (+@) |
1db4d195 | 259 | untie (\[$@%*]) |
c0222185 RGS |
260 | until undef |
261 | use undef | |
262 | utime (@) | |
cba5a3b0 | 263 | values (+) |
c0222185 RGS |
264 | vec ($$$) |
265 | wait () | |
266 | waitpid ($$) | |
267 | wantarray () | |
268 | warn (@) | |
5458a98a | 269 | when undef |
c0222185 RGS |
270 | while undef |
271 | write (;*) | |
95f7e41f FC |
272 | x undef |
273 | xor undef | |
c0222185 | 274 | y undef |