Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (21 sloc) 0.912 kb
6ebdecc [t/spec] More tests for import; also comment on one that I can't see any...
jnthn authored
1 use v6;
2 use Test;
3
4 plan 12;
5
6 # L<S11/"Compile-time Importation"/>
7
e9469ac @moritz add "use lib '.';" to tests that need it
moritz authored
8 use lib '.';
9
6ebdecc [t/spec] More tests for import; also comment on one that I can't see any...
jnthn authored
10 {
11 use t::spec::packages::S11-modules::Foo :others;
12
06ae909 @FROGGS eval => EVAL in S10 to S12
FROGGS authored
13 dies_ok { EVAL 'foo()' }, 'foo() not imported - not tagged :others';
6ebdecc [t/spec] More tests for import; also comment on one that I can't see any...
jnthn authored
14
15 ok( &bar, 'Foo::bar is defined (explicitly :DEFAULT and :others)' );
16 is( bar(), 'Foo::bar', 'Foo::bar is the sub we expect' );
17
18 ok( &baz, 'Foo::baz is defined (:MANDATORY)' );
19 is( baz(), 'Foo::baz', 'Foo::baz is the sub we expect' );
20
06ae909 @FROGGS eval => EVAL in S10 to S12
FROGGS authored
21 dies_ok { EVAL 'bop()' }, 'bop() not imported';
6ebdecc [t/spec] More tests for import; also comment on one that I can't see any...
jnthn authored
22
23 ok( &qux, 'Foo::qux is defined (explicitly :others)' );
24 is( qux(), 'Foo::qux', 'Foo::qux is the sub we expect' );
25
06ae909 @FROGGS eval => EVAL in S10 to S12
FROGGS authored
26 dies_ok { EVAL 'waz()' }, 'waz() not imported';
6ebdecc [t/spec] More tests for import; also comment on one that I can't see any...
jnthn authored
27
28 ok( &gaz, 'Foo::gaz multi is defined (implicitly :others)' );
29 is( gaz(), 'Foo::gaz1', 'Foo::gaz is the sub we expect' );
30 is( gaz(1), 'Foo::gaz2', 'Foo::gaz($x) is the sub we expect' );
31
32 }
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
33
34 # vim: ft=perl6
Something went wrong with that request. Please try again.