-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[t/spec] More tests for import; also comment on one that I can't see …
…any justification for in the spec. If nobody else can either, suggest we kill it. git-svn-id: http://svn.pugscode.org/pugs@26001 c213334d-75ef-0310-aa23-eaa082d1ae64
- Loading branch information
jnthn
committed
Mar 25, 2009
1 parent
95d20df
commit 6ebdecc
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use v6; | ||
use Test; | ||
|
||
plan 12; | ||
|
||
# L<S11/"Compile-time Importation"/> | ||
|
||
{ | ||
use t::spec::packages::S11-modules::Foo :others; | ||
|
||
dies_ok { foo() }, 'foo() not imported - not tagged :others'; | ||
|
||
ok( &bar, 'Foo::bar is defined (explicitly :DEFAULT and :others)' ); | ||
is( bar(), 'Foo::bar', 'Foo::bar is the sub we expect' ); | ||
|
||
ok( &baz, 'Foo::baz is defined (:MANDATORY)' ); | ||
is( baz(), 'Foo::baz', 'Foo::baz is the sub we expect' ); | ||
|
||
dies_ok { bop() }, 'bop() not imported'; | ||
|
||
ok( &qux, 'Foo::qux is defined (explicitly :others)' ); | ||
is( qux(), 'Foo::qux', 'Foo::qux is the sub we expect' ); | ||
|
||
dies_ok { waz() }, 'waz() not imported'; | ||
|
||
ok( &gaz, 'Foo::gaz multi is defined (implicitly :others)' ); | ||
is( gaz(), 'Foo::gaz1', 'Foo::gaz is the sub we expect' ); | ||
is( gaz(1), 'Foo::gaz2', 'Foo::gaz($x) is the sub we expect' ); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters