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