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