Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
clean up importing.t, refudge for rakudo
  • Loading branch information
moritz committed Mar 30, 2012
1 parent 0954436 commit 6fb747c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions S11-modules/importing.t
@@ -1,14 +1,13 @@
use v6;
use Test;

plan 16;
plan 15;

# L<S11/"Compile-time Importation"/>

{
use t::spec::packages::S11-modules::Foo;

ok( &t::spec::packages::S11-modules::Foo::foo, 'Foo::foo is defined' );
ok( &foo, 'Foo::foo is defined (explicitly :DEFAULT)' );
is( foo(), 'Foo::foo', 'Foo::foo is the sub we expect' );

Expand All @@ -26,13 +25,12 @@ plan 16;
is( waz(), 'Foo::waz', 'Foo::waz is the sub we expect' );
is( waz(1), 'Foo::wazhere', 'Foo::waz imported does not wipe out our other waz multis' );

dies_ok { qux() }, 'qux() not imported';
dies_ok { gaz() }, 'gaz() not imported';
#?rakudo 2 todo 'importing stuff'
dies_ok { eval 'qux()' }, 'qux() not imported';
dies_ok { eval 'gaz()' }, 'gaz() not imported';
}

#?rakudo todo 'Importation is currently not lexical'
ok( ! &foo,
'Foo::foo is undefined in outer scope' );
ok( ! &foo, 'Foo::foo is undefined in outer scope' );

{
BEGIN { @*INC.push('t/spec/packages') };
Expand Down

0 comments on commit 6fb747c

Please sign in to comment.