Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #565 from vrurg/rakudo_issue_3116
Tests for Rakudo issue 3116
- Loading branch information
Showing
6 changed files
with
53 additions
and
1 deletion.
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
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,28 @@ | ||
use v6; | ||
use lib <t/packages>; | ||
use Test; | ||
use Test::Helpers; | ||
|
||
my $lib-path = $?FILE.IO.parent(2).add("packages/S11-modules/lib"); | ||
|
||
plan 9; | ||
|
||
for <c d e.PREVIEW> -> $from-rev { | ||
for <c d e> -> $mod-rev { | ||
subtest "6.$mod-rev from 6.$from-rev", { | ||
plan 8; | ||
for (:core-revision($mod-rev), :perl-version("6.$mod-rev")) -> (:key($routine), :value($response)) { | ||
for (:use(''), :require(" <\&$routine>")) -> (:key($statement), :value($starg)) { | ||
is-run 'use v6.' ~$from-rev ~ '; ' ~ $statement ~ ' Module_6' ~ $mod-rev ~ $starg ~ '; print ' ~ $routine, | ||
"$statement: $routine is $response", | ||
:compiler-args('-I', $lib-path), | ||
:out($response), :err(""), :exitcode(0); | ||
is-run 'use v6.' ~ $from-rev ~ '; print EVAL("' ~ $statement ~ ' Module_6' ~ $mod-rev ~ $starg ~ '; ' ~ $routine ~ '")', | ||
"$statement in EVAL: $routine is $response", | ||
:compiler-args('-I', $lib-path), | ||
:out($response), :exitcode(0); | ||
} | ||
} | ||
} | ||
} | ||
} |
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,5 @@ | ||
use v6.c; | ||
unit module Module_6c; | ||
|
||
sub core-revision is export { CORE-SETTING-REV } | ||
sub perl-version is export { BEGIN $*PERL.version } |
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,6 @@ | ||
use v6.d; | ||
|
||
unit module Module_6d; | ||
|
||
sub core-revision is export { CORE-SETTING-REV } | ||
sub perl-version is export { BEGIN $*PERL.version } |
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,5 @@ | ||
use v6.e.PREVIEW; | ||
unit module Module_6e; | ||
|
||
sub core-revision is export { CORE-SETTING-REV } | ||
sub perl-version is export { BEGIN $*PERL.version } |
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,5 @@ | ||
use v6; | ||
unit module NoPrecompilation; | ||
no precompilation; | ||
|
||
sub the-answer is export { 42 } |