Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 381 lines (299 sloc) 11.029 kb
58135b3 [t/spec] changed 'use v6-alpha;' to 'use v6;'
moritz authored
1 use v6;
08d48bd [t] Test suite refactoring.
cosimo authored
2 use Test;
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
3 BEGIN { @*INC.push('t/spec/packages/') };
4 use Test::Util;
08d48bd [t] Test suite refactoring.
cosimo authored
5
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
6 =begin pod
08d48bd [t] Test suite refactoring.
cosimo authored
7
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
8 'Mu' and 'undefine' tests
08d48bd [t] Test suite refactoring.
cosimo authored
9
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
10 This test file contains two sections: a port of the perl5 'undef.t' tests, and
08d48bd [t] Test suite refactoring.
cosimo authored
11 perl6-specific tests.
12
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
13 =end pod
08d48bd [t] Test suite refactoring.
cosimo authored
14
15 # Note: See thread "Undef issues" by Adrian Taylor on p6l
16 # L<http://groups.google.com/groups?threadm=20050601002444.GB32060@wall.org>
17 # On Tue, May 24, 2005 at 10:53:59PM +1000, Stuart Cook wrote:
18 # : I'm not sure whether this behaviour is supposed to be changing.
19 #
20 # It is. I think we decided to make the value undef, and the function
21 # undefine(). (But these days most values of undef really ought to
22 # be constructed and returned (or thrown) using fail().)
23 #
24 # Larry
25
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
26 plan *;
08d48bd [t] Test suite refactoring.
cosimo authored
27
28 our $GLOBAL;
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
29
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
30 # L<S32::Basics/Mu/=item defined>
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
31
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
32 ok(Mu === Mu, "Mu is equal to Mu");
33 ok(!defined(Mu), "Mu is not defined");
08d48bd [t] Test suite refactoring.
cosimo authored
34
35 {
36 my $a;
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
37 ok(!defined($a), "uninitialized lexicals are undefined");
08d48bd [t] Test suite refactoring.
cosimo authored
38
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
39 ok(!defined($GLOBAL), "uninitialized package vars are undefined");
08d48bd [t] Test suite refactoring.
cosimo authored
40
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
41 $a += 1;
08d48bd [t] Test suite refactoring.
cosimo authored
42 ok(defined($a), "initialized var is defined");
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
43 is_run( 'my $a; $a += 1', { err => '', out => '', status => 0 },
44 'increment of undefined variable does not warn' );
08d48bd [t] Test suite refactoring.
cosimo authored
45
46 undefine $a;
47 ok(!defined($a), "undefine($a) does");
48
49 $a = "hi";
50 ok(defined($a), "string");
51
52 my $b;
53 $a = $b;
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
54 ok(!defined($a), "assigning another undefined lexical");
08d48bd [t] Test suite refactoring.
cosimo authored
55
56 $a = $GLOBAL;
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
57 ok(!defined($a), "assigning another undefined global");
08d48bd [t] Test suite refactoring.
cosimo authored
58 }
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
59
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
60 # L<S32::Basics/Mu/"=item undefine">
08d48bd [t] Test suite refactoring.
cosimo authored
61 {
62 my @ary = "arg1";
63 my $a = @ary.pop;
64 ok(defined($a), "pop from array");
65 $a = @ary.pop;
66 ok(!defined($a), "pop from empty array");
67
68 @ary = "arg1";
69 $a = @ary.shift;
70 ok(defined($a), "shift from array");
71 $a = @ary.shift;
72 ok(!defined($a), "shift from empty array");
73
74 my %hash = ( bar => 'baz', quux => 'quuz' );
75 ok(defined(%hash<bar>), "hash subscript");
76 ok(!defined(%hash<bargho>), "non-existent hash subscript");
77
78 undefine %hash<bar>;
79 ok(!defined(%hash<bar>), "undefine hash subscript");
80
81 %hash<bar> = "baz";
82 %hash.delete("bar");
83 ok(!defined(%hash<bar>), "delete hash subscript");
84
85 ok(defined(@ary), "aggregate array defined");
86 ok(defined(%hash), "aggregate hash defined");
87
88 undefine(@ary);
a20c69c [t/spec/*.t] :todo whackage
lwall authored
89 #?pugs todo 'bug'
173bb69 [t/spec] correct undef.t, and fudge for rakudo
moritz authored
90 #?rakudo todo 'definedness of array'
a20c69c [t/spec/*.t] :todo whackage
lwall authored
91 ok(!defined(@ary), "undefine array");
08d48bd [t] Test suite refactoring.
cosimo authored
92
173bb69 [t/spec] correct undef.t, and fudge for rakudo
moritz authored
93 #?rakudo emit #
08d48bd [t] Test suite refactoring.
cosimo authored
94 undefine(%hash);
a20c69c [t/spec/*.t] :todo whackage
lwall authored
95 #?pugs todo 'bug'
173bb69 [t/spec] correct undef.t, and fudge for rakudo
moritz authored
96 #?rakudo todo 'definedness of hash'
a20c69c [t/spec/*.t] :todo whackage
lwall authored
97 ok(!defined(%hash), "undefine hash");
08d48bd [t] Test suite refactoring.
cosimo authored
98
99 @ary = (1);
100 ok(defined(@ary), "define array again");
101 %hash = (1,1);
102 ok(defined(%hash), "define hash again");
103 }
104
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
105 #?rakudo skip 'access to &your_sub'
08d48bd [t] Test suite refactoring.
cosimo authored
106 {
107 sub a_sub { "møøse" }
108
109 ok(defined(&a_sub), "defined sub");
a20c69c [t/spec/*.t] :todo whackage
lwall authored
110 #?pugs todo 'parsefail'
111 ok(eval('defined(%«$?PACKAGE\::»<&a_sub>)'), "defined sub (symbol table)");
08d48bd [t] Test suite refactoring.
cosimo authored
112
a20c69c [t/spec/*.t] :todo whackage
lwall authored
113 #?pugs todo 'feature'
114 ok(eval('!defined(&a_subwoofer)'), "undefined sub");
115 #?pugs todo 'feature'
116 ok(eval('!defined(%«$?PACKAGE\::»<&a_subwoofer>)'), "undefined sub (symbol table)");
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
117
118 dies_ok { undefine &a_sub }, 'die trying to undefine a sub';
119 ok defined &a_sub, 'sub is still defined after attempt to undefine';
08d48bd [t] Test suite refactoring.
cosimo authored
120 }
121
122 # TODO: find a read-only value to try and assign to, since we don't
123 # have rules right now to play around with (the p5 version used $1)
124 #eval { "constant" = "something else"; };
125 #is($!, "Modification of a read", "readonly write yields exception");
126
127 # skipped tests for tied things
128
129 # skipped test for attempt to undef a bareword -- no barewords here.
130
131 # TODO: p5 "bugid 3096
132 # undefing a hash may free objects with destructors that then try to
133 # modify the hash. To them, the hash should appear empty."
134
135
136 # Test LHS assignment to undef:
297e783 [t] and [t/spec]
moritz authored
137 # XXX shouldn't that be * instead of undef?
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
138 # yes, this chunk should move to a different file --Larry
08d48bd [t] Test suite refactoring.
cosimo authored
139
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
140 {
141 my $interesting;
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
142 (*, *, $interesting) = (1,2,3);
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
143 is($interesting, 3, "Undef on LHS of list assignment");
08d48bd [t] Test suite refactoring.
cosimo authored
144
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
145 (*, $interesting, *) = (1,2,3);
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
146 is($interesting, 2, "Undef on LHS of list assignment");
08d48bd [t] Test suite refactoring.
cosimo authored
147
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
148 ($interesting, *, *) = (1,2,3);
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
149 is($interesting, 1, "Undef on LHS of list assignment");
08d48bd [t] Test suite refactoring.
cosimo authored
150
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
151 sub two_elements() { (1,2) };
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
152 (*,$interesting) = two_elements();
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
153 is($interesting, 2, "Undef on LHS of function assignment");
08d48bd [t] Test suite refactoring.
cosimo authored
154
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
155 ($interesting, *) = two_elements();
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
156 is($interesting, 1, "Undef on LHS of function assignment");
157 }
08d48bd [t] Test suite refactoring.
cosimo authored
158
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
159 =begin pod
08d48bd [t] Test suite refactoring.
cosimo authored
160
161 Perl6-specific tests
162
f660aa6 [t/spec] Possibly converted all remaining pod markers to pod6
cosimo authored
163 =end pod
08d48bd [t] Test suite refactoring.
cosimo authored
164
173bb69 [t/spec] correct undef.t, and fudge for rakudo
moritz authored
165 #?rakudo skip 'fun with undefine'
08d48bd [t] Test suite refactoring.
cosimo authored
166 {
167 # aggregate references
168
169 my @ary = (<a b c d e>);
170 my $ary_r = @ary; # ref
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
171 isa_ok($ary_r, Array);
08d48bd [t] Test suite refactoring.
cosimo authored
172 ok(defined($ary_r), "array reference");
173
174 undefine @ary;
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
175 ok(!+$ary_r, "undefine array referent");
08d48bd [t] Test suite refactoring.
cosimo authored
176
177 is(+$ary_r, 0, "dangling array reference");
178
179 my %hash = (1, 2, 3, 4);
180 my $hash_r = %hash;
181 isa_ok($hash_r, "Hash");
182 ok(defined($hash_r), "hash reference");
183 undefine %hash;
184 ok(defined($hash_r), "undefine hash referent:");
185 is(+$hash_r.keys, 0, "dangling hash reference");
186 }
187
188 {
189 my Array $an_ary;
190 ok(!defined($an_ary), "my Array");
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
191 ok((try { !defined($an_ary[0]) }), "my Array subscript - Mu");
08d48bd [t] Test suite refactoring.
cosimo authored
192 try { $an_ary.push("blergh") };
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
193 ok((try { defined($an_ary.pop) }), "push");
194 ok((try { !defined($an_ary.pop) }), "comes to shove");
02df239 Unfudge some passing autoviv tests.
pmichaud authored
195 }
08d48bd [t] Test suite refactoring.
cosimo authored
196
02df239 Unfudge some passing autoviv tests.
pmichaud authored
197 #?rakudo skip 'Autovivify hashes'
198 {
08d48bd [t] Test suite refactoring.
cosimo authored
199 my Hash $a_hash;
200
201 ok(!defined($a_hash), "my Hash");
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
202 ok((try { !defined($a_hash<blergh>) }), "my Hash subscript - Mu");
203 ok((try { !defined($a_hash<blergh>) }), "my Hash subscript - Mu, no autovivification happened");
08d48bd [t] Test suite refactoring.
cosimo authored
204
205 $a_hash<blergh> = 1;
206 ok(defined($a_hash.delete('blergh')), "delete");
207 ok(!defined($a_hash.delete("blergh")), " - once only");
02df239 Unfudge some passing autoviv tests.
pmichaud authored
208 }
209
08d48bd [t] Test suite refactoring.
cosimo authored
210
02df239 Unfudge some passing autoviv tests.
pmichaud authored
211 {
08d48bd [t] Test suite refactoring.
cosimo authored
212 class Dog {};
213 my Dog $spot;
214
215 ok(!defined($spot), "Unelaborated mutt");
216 $spot .= new;
217 ok(defined $spot, " - now real");
218 }
219
220 # rules
221 # TODO. refer to S05
222 # L<S05/Match objects/"they will all be undefined" closure
223 # "let keyword">
224
ea2ee24 [STD] various bugs
lwall authored
225 # - unmatched alternative should bind to undef
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
226 #?rakudo skip 'null PMC access in type()'
ece272c [t/spec] fudged undef.t for rakudo
moritz authored
227 #?DOES 10
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
228 {
4ad9719 [undef.t] there is no my() function...declarators require space
lwall authored
229 my ($num, $alpha);
230 my ($rx1, $rx2);
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
231 eval '
232 $rx1 = rx
233 / [ (\d+) { let $<num> := $0 }
234 | (<alpha>+) { let $<alpha> := $1 }
235 ]
236 /;
237 $rx2 = rx
238 / [ $<num> := (\d+)
239 | $<alpha>:= (<alpha>+)
240 ]
241 /;
242 ';
243 for (<rx1 rx2>) {
244 # I want symbolic lookups because I need the rx names for test results.
245
246 eval '"1" ~~ %MY::{$_}';
247 #?pugs todo 'unimpl'
248 ok(defined($num), '{$_}: successful hypothetical');
249 ok(!defined($alpha), '{$_}: failed hypothetical');
250
251 eval '"A" ~~ %MY::{$_}';
252 ok(!defined($num), '{$_}: failed hypothetical (2nd go)');
253 #?pugs todo 'unimpl'
254 ok(defined($alpha), '{$_}: successful hypothetical (2nd go)');
255 }
08d48bd [t] Test suite refactoring.
cosimo authored
256
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
257 # - binding to hash keys only would leave values undefined
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
258 eval '"a=b\nc=d\n" ~~ / $<matches> := [ (\w) = \N+ ]* /';
259 #?pugs todo 'unimpl'
260 ok(eval('$<matches> ~~ all(<a b>)'), "match keys exist");
08d48bd [t] Test suite refactoring.
cosimo authored
261
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
262 #ok(!defined($<matches><a>) && !defined($<matches><b>), "match values don't");
263 #?pugs todo 'unimpl'
264 ok(0 , "match values don't");
265 }
3604100 more buglets
lwall authored
266
ece272c [t/spec] fudged undef.t for rakudo
moritz authored
267 #?DOES 1
08d48bd [t] Test suite refactoring.
cosimo authored
268 {
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
269 # - $0, $1 etc. should all be undefined after a failed match
08d48bd [t] Test suite refactoring.
cosimo authored
270 # (except for special circumstances)
972b6e4 [t/spec] simplify a few tests to use /../ instead of rx/../
moritz authored
271 "abcde" ~~ /(.)(.)(.)/;
272 "abcde" ~~ /(\d)/;
08d48bd [t] Test suite refactoring.
cosimo authored
273 ok((!try { grep { defined($_) }, ($0, $1, $2, $3, $4, $5) }),
274 "all submatches undefined after failed match") or
275 diag("match state: " ~ eval '$/');
276
277 # XXX write me: "special circumstances"
278 }
279
280
281 # subroutines
282 {
283 sub bar ($bar, $baz?, :$quux) {
284 is($bar, "BAR", "defined param"); # sanity
285
60d29c6 fix some legacy smartlink syntax
szabgab authored
286 # L<S06/Optional parameters/Missing optional arguments>
08d48bd [t] Test suite refactoring.
cosimo authored
287 ok(!defined($baz), "unspecified optional param");
288
60d29c6 fix some legacy smartlink syntax
szabgab authored
289 # L<S06/Named parameters/Named parameters are optional>
08d48bd [t] Test suite refactoring.
cosimo authored
290 ok(!defined($quux), "unspecified optional param");
291 }
292
293 bar("BAR");
294
295 }
296
297 # autoloading
298 # L<S10/Autoloading>
299
300 # Currently waiting on
301 # - packages
302 # - symtable hash
303 # - autoloading itself
304
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
305 #?pugs skip 'parsefail'
306 #?rakudo skip 'parsefail'
307 flunk('FIXME: parsefail');
f9002e6 [STD] now does reduce tokens correctly; we now use a variable length
lwall authored
308 # {
08d48bd [t] Test suite refactoring.
cosimo authored
309 # package AutoMechanic {
310 # AUTOSCALAR { \my $_scalar }
311 # AUTOARRAY { \my @_array }
312 # AUTOHASH { \my %_hash }
313 # AUTOSUB { { "code" } }
314 # AUTOMETH { { "code" } }
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
315 #
08d48bd [t] Test suite refactoring.
cosimo authored
316 # AUTOSCALARDEF { %::«{'$' ~ $_}» = "autoscalardef" }
317 # AUTOARRAYDEF { %::«{'@' ~ $_}» = "autoarraydef".split("") }
318 # AUTOHASHDEF { %::«{'%' ~ $_}» = <autohashdef yes> }
319 # AUTOSUBDEF { %::«{'&' ~ $_}» = { "autosubdef" } }
320 # AUTOMETHDEF { %::«{'&' ~ $_}» = { "automethdef" } }
321 # }
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
322 #
08d48bd [t] Test suite refactoring.
cosimo authored
323 # is(WHAT $AutoMechanic::scalar0, "Scalar", "autoload - scalar");
324 # is(WHAT @AutoMechanic::array0, "Array", "autoload - array");
325 # is(WHAT %AutoMechanic::hash, "Hash", "autoload - hash");
326 # is(WHAT &AutoMechanic::sub0, "Code", "autoload - sub");
327 # is(WHAT AutoMechanic.can("meth0"), "Code", "autoload - meth");
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
328 #
08d48bd [t] Test suite refactoring.
cosimo authored
329 # is($AutoMechanic::scalar, "autoscalardef", "autoloaddef - scalar");
330 # is(~@AutoMechanic::ary, ~("autoarraydef".split(""), "autoloaddef - array");
331 # is(~%AutoMechanic::hash, ~<autohashdef yes>, "autoloaddef - hash");
332 # is(&AutoMechanic::sub.(), "autosubdef", "autoloaddef - sub");
333 # is(AutoMechanic.meth(), "automethdef", "autoloaddef - method");
f9002e6 [STD] now does reduce tokens correctly; we now use a variable length
lwall authored
334 # }
08d48bd [t] Test suite refactoring.
cosimo authored
335
336 # Extra tests added due to apparent bugs
173bb69 [t/spec] correct undef.t, and fudge for rakudo
moritz authored
337 is((Any) + 1, 1, 'Any + 1');
338 is(1 + (Any), 1, '1 + Any');
339 is((Any) * 2, 0, 'Any * 2');
340 is(2 * (Any), 0, '2 * Any');
341 is((Any) xx 2, [Any, Any], 'Any xx 2');
342 is((Any) * (Any), 0, 'Any * Any');
08d48bd [t] Test suite refactoring.
cosimo authored
343
344 # L<http://colabti.de/irclogger/irclogger_log/perl6?date=2006-09-12,Tue&sel=145#l186>
345 # See log above. From IRC, TimToady says that both of these
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
346 # should be false. (At time of writing, @(Mu,) is true.)
a20c69c [t/spec/*.t] :todo whackage
lwall authored
347 #?pugs todo 'feature', :depends<@() imposing context and not [] constructor>;
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
348 #?rakudo 2 skip 'todo: lists, defined, truthness'
8f9a119 [t/] unify compartmentalized undef and Object concepts into Mu
lwall authored
349 is ?(@(Mu,)), Bool::False, '?(@(Mu,)) is false';
350 is ?(list(Mu,)), Bool::False, '?(@(Mu,)) is false';
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
351
e702d26 [t/spec] really test for #61868 this time
moritz authored
352 lives_ok { uc(eval("")) }, 'can use eval("") in further expressions';
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
353
354 {
355 sub lie { Bool::False }
356 ok lie() ~~ Bool, 'sub returns a bool';
357 dies_ok { undefine lie }, 'attempt to undefine returned Bool type dies';
358 ok lie() ~~ Bool, 'sub still returns a bool';
359 }
360
361 {
362 sub def { my $x = [] }
363 ok def() ~~ Array, 'sub returns array';
364 lives_ok { undefine def }, 'attempt to undefine returned array lives';
365 ok def() ~~ Array, 'sub still returns array';
366
367 dies_ok { undefine &def }, 'attempt to undefine sub dies';
368 ok defined &def, 'attempt to undefine sub fails';
f000672 [t/spec] Test suggested by moritz++
kyle authored
369 ok def() ~~ Array, 'can still call sub after attempt to undefine it';
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
370 }
371
29deb7f [t/spec] test that you can undefine a lexical variable twice; RT #69238
moritz authored
372 # RT #69238
373 {
374 sub foo { my $a = "baz"; undefine $a; undefine $a; $a; }
375 ok !defined(foo()), 'can undefine $a twice without any troubles';
376 }
377
ae01205 [t/spec] Tests inspired by IRC: http://irclog.perlgeek.de/perl6/2009-10-...
kyle authored
378 done_testing;
379
5f0915d [t/spec] partially fudge undef.t for rakudo. Pending fudge bugs.
moritz authored
380 # vim: ft=perl6
Something went wrong with that request. Please try again.