Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 57 lines (42 sloc) 1.645 kb
c4bb02cc »
2008-10-15 [t] add three tests for import, currently failing in rakudo
1 use v6;
2 use Test;
3
86459a98 »
2012-05-08 test that non-existent export tags die on importing
4 plan 16;
c4bb02cc »
2008-10-15 [t] add three tests for import, currently failing in rakudo
5
6 # L<S11/"Compile-time Importation"/>
7
8 {
9 use t::spec::packages::S11-modules::Foo;
10
95d20df0 »
2009-03-25 [t/spec] A few more import tests.
11 ok( &foo, 'Foo::foo is defined (explicitly :DEFAULT)' );
c4bb02cc »
2008-10-15 [t] add three tests for import, currently failing in rakudo
12 is( foo(), 'Foo::foo', 'Foo::foo is the sub we expect' );
13
6ebdecc5 »
2009-03-25 [t/spec] More tests for import; also comment on one that I can't see …
14 ok( &bar, 'Foo::bar is defined (explicitly :DEFAULT and :others)' );
15 is( bar(), 'Foo::bar', 'Foo::bar is the sub we expect' );
16
17 ok( &baz, 'Foo::baz is defined (:MANDATORY)' );
18 is( baz(), 'Foo::baz', 'Foo::baz is the sub we expect' );
19
95d20df0 »
2009-03-25 [t/spec] A few more import tests.
20 ok( &bop, 'Foo::bop is defined (implicitly :DEFAULT)' );
21 is( bop(), 'Foo::bop', 'Foo::bop is the sub we expect' );
22
8dc7d4b8 »
2010-07-15 [t/spec] mark various tests that intentionally declare things that ar…
23 multi waz($x) { 'Foo::wazhere' } #OK not used
abc9cbd0 »
2012-07-16 pugs fudge
24 #?pugs skip 'Cannot cast from VUndef to VCode'
95d20df0 »
2009-03-25 [t/spec] A few more import tests.
25 ok( &waz, 'Foo::waz multi is defined (implicitly :DEFAULT)' );
26 is( waz(), 'Foo::waz', 'Foo::waz is the sub we expect' );
27 is( waz(1), 'Foo::wazhere', 'Foo::waz imported does not wipe out our other waz multis' );
6ebdecc5 »
2009-03-25 [t/spec] More tests for import; also comment on one that I can't see …
28
abc9cbd0 »
2012-07-16 pugs fudge
29 #?pugs todo
06ae9097 »
2014-01-01 eval => EVAL in S10 to S12
30 dies_ok { EVAL 'qux()' }, 'qux() not imported';
abc9cbd0 »
2012-07-16 pugs fudge
31 #?pugs todo
06ae9097 »
2014-01-01 eval => EVAL in S10 to S12
32 dies_ok { EVAL 'gaz()' }, 'gaz() not imported';
c4bb02cc »
2008-10-15 [t] add three tests for import, currently failing in rakudo
33 }
34
abc9cbd0 »
2012-07-16 pugs fudge
35 #?pugs skip 'Undeclared variable'
06ae9097 »
2014-01-01 eval => EVAL in S10 to S12
36 dies_ok( { EVAL '&foo' }, 'Foo::foo is undefined in outer scope' );
b35ca506 »
2009-03-29 [t/spec] test for RT #62728
37
abc9cbd0 »
2012-07-16 pugs fudge
38 #?pugs todo
b35ca506 »
2009-03-29 [t/spec] test for RT #62728
39 {
40 BEGIN { @*INC.push('t/spec/packages') };
41 class TestImportInClass {
42 use A::B;
43 method doit {
44 A::B::D.new();
45 }
46 }
47 lives_ok { TestImportInClass.doit() },
48 "can instantiate class that's loaded from inside another class";
49
50 }
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
51
abc9cbd0 »
2012-07-16 pugs fudge
52 #?pugs todo
86459a98 »
2012-05-08 test that non-existent export tags die on importing
53 eval_dies_ok 'use t::spec::packages::S11-modules::Foo :NoSucTag;',
54 'die while trying to import a non-existent export tag';
55
7f29bc53 »
2009-08-08 [t/spec] Add vim: lines everywhere.
56 # vim: ft=perl6
Something went wrong with that request. Please try again.