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