Skip to content

Commit

Permalink
Revert "[v6.d REVIEW] Use preciser test routines"
Browse files Browse the repository at this point in the history
This reverts commit 6fa5f64.

`use "t/spec/packages"`, and hence Test::Util, cannot be used
here  because the 'can change directory and require a module'
test relies on t/spec/packages not being loaded.
  • Loading branch information
ugexe committed Feb 23, 2018
1 parent dfe7430 commit fb83b01
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions S11-modules/require.t
@@ -1,14 +1,12 @@
use v6;

use lib $?FILE.IO.parent(2), $?FILE.IO.parent.add("lib");
use Test::Util;
use MONKEY-SEE-NO-EVAL;

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


# RT #126100
{
is $required-Test.gist, '(Test)', "successful require PACKAGE returns PACKAGE";
Expand Down Expand Up @@ -107,11 +105,10 @@ eval-lives-ok q|BEGIN require Fancy::Utilities;|, 'require works at BEGIN';
eval-lives-ok q|BEGIN require Fancy::Utilities <&allgreet>;|,'require can import at BEGIN';

{
require "S11-modules/GlobalOuter.pm";
cmp-ok ::('GlobalOuter'), '!~~', Failure, "got outer symbol";
ok ::('GlobalOuter').load, "call method that causes a require";
fails-like { ::('GlobalInner') }, X::NoSuchSymbol,
"did not find inner symbol";
require "S11-modules/GlobalOuter.pm";
nok ::('GlobalOuter') ~~ Failure, "got outer symbol";
ok ::('GlobalOuter').load, "call method that causes a require";
ok ::('GlobalInner') ~~ Failure, "Did not find inner symbol";
}

# Test that symbols under a core package namespace (Cool::) are merged.
Expand Down

0 comments on commit fb83b01

Please sign in to comment.