Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add (fudged) test for RT#124324
Also, silence nqp warnings from inside evals in Test::Compile
  • Loading branch information
skids committed Aug 8, 2015
1 parent 86a4c3e commit e7f5bb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion integration/precompiled.t
Expand Up @@ -19,7 +19,7 @@ use Test::Compile;
# CompUnit or CompUnitRepo or are just too complex for Test::Compile
# A few of the tests in there could eventually be moved here, probably.

plan 5;
plan 6;

loads_ok '42', "loads_ok is working";
precomp_loads_ok '42', "precomp_loads_ok is working";
Expand All @@ -33,3 +33,9 @@ precomp_loads_is '42', 42, "precomp_loads_is is working";
# RT #124162
precomp_loads_is '[ $(array[uint8].new(1)), $(array[uint8].new(1)) ]', [1,1],
"precompiled Array of native arrays (RT #124162)";

#?rakudo todo 'RT #124324 Missing or wrong version of dependency'
precomp_loads_is 'BEGIN { EVAL "43" }', 43, "precompiled EVAL in BEGIN";



3 changes: 3 additions & 0 deletions packages/Test/Compile.pm
Expand Up @@ -208,6 +208,7 @@ sub init_compunit {
# CompUnit.load is broken right now.
# $cu.load($fp, { from => "Perl6" });
# So we hit some rakudo internals to do the same thing
use nqp;
my Mu $p6ml := nqp::gethllsym("perl6", "ModuleLoader");
if ($compunit_available eq "Source") {
Expand Down Expand Up @@ -300,6 +301,7 @@ sub do_compunit($code_as_str, $reason, $leavefiles = False, $compile = True) {
}
@compunits_to_delete.push($cu.precomp-path);
try EVAL '
use nqp;
# CompUnit.load is broken right now.
# $cu.load($fp, { from => "Perl6" });
Expand Down Expand Up @@ -333,6 +335,7 @@ sub do_compunit($code_as_str, $reason, $leavefiles = False, $compile = True) {
}
@compunits_to_delete.push("$fp.pm6");
try EVAL '
use nqp;
$cu = CompUnit.new("$fp.pm6");
# CompUnit.load is broken right now.
Expand Down

0 comments on commit e7f5bb7

Please sign in to comment.