Skip to content

Commit

Permalink
Test for require module under core namepsace
Browse files Browse the repository at this point in the history
So the following doesn't happen accidentally to IO::Socket::SSL again
rakudo/rakudo#714
  • Loading branch information
LLFourn committed Feb 20, 2016
1 parent 27d0da3 commit 653b200
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions S11-modules/lib/Cool/Utils.pm6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
unit module Cool::Utils;
12 changes: 9 additions & 3 deletions S11-modules/require.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use v6;

use lib '.';
use lib $?FILE.IO.parent.child("lib").Str;
use MONKEY-SEE-NO-EVAL;

my $required-Test = (require Test <&plan &is &lives-ok &skip &todo
&nok &throws-like &eval-lives-ok &ok>);
plan 25;
plan 27;

# RT #126100
{
Expand Down Expand Up @@ -111,5 +110,12 @@ nok ::('&bar'),"bar didn't leak";
nok ::('GlobalInner') ~~ Failure, "got inner symbol";
}

# Test that symbols under a core package namespace (Cool::) are merged.
# see https://github.com/rakudo/rakudo/pull/714, WRT IO::Socket::SSL
{
my $res = (require Cool::Utils);
nok ::('Cool::Utils') ~~ Failure,'Cool::Utils has been merged';
is $res,::('Cool::Utils'), 'Cool::Utils was returned';
}

# vim: ft=perl6

0 comments on commit 653b200

Please sign in to comment.