Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.518 kb
dcee9307 » moritz
2009-04-17 [t] move macro tests to spec/ and unspecced/
1 use v6;
2
3 use Test;
4
820912f2 » moritz
2009-08-02 [t/spec] more smartlinks; less than 100 remain without smartlinks
5 #L<S06/"Macros">
dcee9307 » moritz
2009-04-17 [t] move macro tests to spec/ and unspecced/
6
7 plan 4;
8
9 {
10 my $z = 3;
11 my $in_macro;
12 my $in_macro_clos;
13 macro returns_a_closure {
14 my $x = 42;
15 $in_macro = 1;
16 return { $in_macro_clos++; 100 + $x + $z };
17 }
18
19 is $in_macro, 1, "macro was executed during compile time";
20 ok !$in_macro_clos, "macro closure was not executed during compile time";
21 is returns_a_closure, 145, "closure returning macro";
22 is $in_macro_clos, 1, "macro closure was executed during runtime";
23 }
820912f2 » moritz
2009-08-02 [t/spec] more smartlinks; less than 100 remain without smartlinks
24
25 # vim: ft=perl6
Something went wrong with that request. Please try again.