Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[gsoc_specteset] adding some simple module re-export tests

git-svn-id: http://svn.pugscode.org/pugs@20564 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit b4a9b3280eab43b5934fb1d0d5c8b06d1c515915 1 parent 62b1a32
Auzon authored
View
7 S11-modules/InnerModule.pm
@@ -0,0 +1,7 @@
+module InnerModule;
+use v6;
+
+sub foo is export(:DEFAULT) {'Inner::foo'}
+sub bar is export {'Inner::bar'}
+sub baz is export(:MANDATORY) {'Inner::baz'}
+# sub qux is export(:sometag) {'Inner::qux'}
View
4 S11-modules/OuterModule.pm
@@ -0,0 +1,4 @@
+module OuterModule;
+use v6;
+
+use InnerModule :ALL :EXPORT;
View
13 S11-modules/re-export.t
@@ -0,0 +1,13 @@
+use v6;
+use Test;
+
+plan 8;
+
+# L<S11/"Compile-time Importation"/"In the absence of a specific scoping specified by the caller">
+
+use Outer :ALL;
+
+is(foo(), 'Inner::foo', 're-exporting works using is export(:DEFAULT)');
+is(bar(), 'Inner::bar', 're-exporting works using is export');
+is(baz(), 'Inner::baz', 're-exporting works using is export(:MANDATORY)');
+# is(qux(), 'Inner::qux', 're-exporting works using is export(:sometag)');
Please sign in to comment.
Something went wrong with that request. Please try again.