Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for non-containerized exports
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use v6; | ||
use Test; | ||
|
||
plan 8; | ||
|
||
# GH#2979 Symbols are not to be exported in containerized form. | ||
|
||
use lib $?FILE.IO.parent(2).add("packages/S11-modules/lib"); | ||
|
||
use GH2979; | ||
|
||
is @foo.VAR.^name, 'Array', 're-exported Array'; | ||
is %foo.VAR.^name, 'Hash', 're-exported Hash'; | ||
is $foo.VAR.^name, 'Scalar', 're-exported Scalar'; | ||
is &foo.VAR.^name, 'Sub', 're-exported Sub'; | ||
is @bar.VAR.^name, 'Array', 'exported Array'; | ||
is %bar.VAR.^name, 'Hash', 'exported Hash'; | ||
is $bar.VAR.^name, 'Scalar', 'exported Scalar'; | ||
is &bar.VAR.^name, 'Sub', 'exported Sub'; | ||
|
||
# vim: ft=perl6 sw=4 expandtabs |
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,7 @@ | ||
use v6; | ||
unit module GH2979-Foo; | ||
|
||
our @foo is export; | ||
our %foo is export; | ||
our $foo is export; | ||
sub foo is export { } |
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,17 @@ | ||
use v6; | ||
use GH2979-Foo; | ||
|
||
our @b; | ||
our %b; | ||
our $b; | ||
sub b { } | ||
|
||
multi EXPORT { | ||
%( | ||
GH2979-Foo::EXPORT::ALL::, | ||
'@bar' => @b, | ||
'%bar' => %b, | ||
'$bar' => $b, | ||
'&bar' => &b, | ||
) | ||
} |