-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
168 additions
and
44 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ | |
1 | ||
2 | ||
HN | ||
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
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
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
Binary file not shown.
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
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,53 @@ | ||
BEGIN %*ENV<RAKU_TEST_DIE_ON_FAIL> = 1; | ||
use Test; | ||
|
||
plan 4; | ||
|
||
my $dir = $*PROGRAM.parent; | ||
my $dira = $dir.absolute ~ $*SPEC.dir-sep; | ||
my $rel := $dir.relative ~ $*SPEC.dir-sep; | ||
my $dot = $?FILE.IO.parent.parent; | ||
my $rak := $dot.add("bin").add("rak").relative; | ||
|
||
# using paths from here on out | ||
$dot .= relative; | ||
$dir .= absolute; | ||
|
||
my sub query-ok( | ||
*@query, # the actual parameters | ||
:$ok is copy, # the expected result | ||
:$head = 1, # whether to do the --only-first test with this number | ||
:$add-human = True, # add human specification | ||
) is test-assertion { | ||
my @args = $*EXECUTABLE.absolute, "-I$dot", $rak, @query.Slip; | ||
@args.push: "--human" if $add-human; | ||
$ok .= chomp; | ||
|
||
# Logic to run the query | ||
my sub run-query() { | ||
my $proc := run @args, :out, :err; | ||
my $key = "huh?"; | ||
|
||
is $proc.err.slurp(:close), "", "is '@query[]' STDERR clean?"; | ||
$proc.out.lines.map(*.subst($rel, :g)).join("\n") | ||
} | ||
|
||
# Base query | ||
is run-query, $ok, "is '@query[]' result ok?"; | ||
} | ||
|
||
query-ok '--mbc-frames', Q/*.name/, 'mbc', '--unique', ok => qq:to/OK/; | ||
<unit-outer> | ||
<unit> | ||
eigenstates | ||
<dependencies+deserialize> | ||
|
||
<load> | ||
OK | ||
|
||
query-ok <--mbc-strings distribution mbc --/highlight>, ok => qq:to/OK/; | ||
mbc/eigenstates.mbc | ||
55:The eigenstates distribution exports a single subroutine called | ||
OK | ||
|
||
# vim: expandtab shiftwidth=4 |