Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
provide EXPORT sub in 007::Test
In preparation of selectively re-using that module for tests that
run against runtime.007 instead of Runtime.pm.

Since we want to selectively "override" some of the subs from in
there, we'll want to selectively import the rest.
  • Loading branch information
Carl Masak committed Jun 8, 2016
1 parent ada204b commit 5b4eaa0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/_007/Test.pm
Expand Up @@ -344,3 +344,20 @@ sub throws-exception($program, $message, $desc = "MISSING TEST DESCRIPTION") is

flunk $desc;
}

our sub EXPORT(*@things) {
my %exports;
for @things -> $thing {
my $routine = {
'&read' => &read,
'&is-result' => &is-result,
'&is-error' => &is-error,
'&parses-to' => &parses-to,
'&parse-error' => &parse-error,
'&outputs' => &outputs,
'&throws-exception' => &throws-exception,
}{$thing} // die "Didn't find '$thing'";
%exports{$thing} = $routine;
}
return %exports;
}

0 comments on commit 5b4eaa0

Please sign in to comment.