Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Extended $?VM/$*VM and $?DISTRO/$*DISTRO testing
- Loading branch information
Showing
2 changed files
with
60 additions
and
5 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
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 |
|---|---|---|
| @@ -1,7 +1,56 @@ | ||
| use v6; | ||
|
|
||
| use Test; | ||
|
|
||
| plan 3; | ||
| my $isjvm = $*VM.name eq 'jvm'; | ||
| plan 28 + 2 * $isjvm; | ||
|
|
||
| # $?VM.name is the Virtual machine we were compiled in. | ||
| #?rakudo skip 'unimpl $?VM' | ||
| { | ||
| ok $?VM.name, "We were compiled in '{$?VM.name}'"; | ||
| ok $?VM.auth, "Authority is '{$?VM.auth}'"; | ||
| ok $?VM.version, "Version is '{$?VM.version}'"; | ||
| ok $?VM.signature, "Signature is '{$?VM.signature}'"; | ||
| ok $?VM.desc, "Description is '{$?VM.desc}'"; | ||
| ok $?VM.config, "We have config"; | ||
| ok $?VM.properties, "We have properties" if $isjvm; | ||
| ok $?VM.desc, "Description is '{$?VM.desc}'"; | ||
| ok $?VM.precomp-ext, "Extension is '{$?VM.precomp-ext}'"; | ||
| ok $?VM.precomp-target, "Extension is '{$?VM.precomp-target}'"; | ||
|
|
||
| ok $?VM.perl, 'We can do a $?VM.perl'; | ||
| ok $?VM.gist, 'We can do a $?VM.gist'; | ||
|
|
||
| diag "'{$?VM.name}' is an unknown VM, please report" if ! | ||
| ok $?VM.name eq any($?PERL.VMnames), | ||
| "We know of the VM we were compiled in"; | ||
|
|
||
| isa_ok $?VM.version, Version; | ||
| isa_ok $?VM.signature, Blob; | ||
| } | ||
|
|
||
| ok $*VM.name, "We are running under '{$*VM.name}'"; | ||
| ok $*VM.auth, "Authority is '{$*VM.auth}'"; | ||
| ok $*VM.version, "Version is '{$*VM.version}'"; | ||
| #?rakudo todo 'no VM.signature yet' | ||
| ok $*VM.signature, "Signature is '{$*VM.signature}'"; | ||
| ok $*VM.config, "We have config"; | ||
| ok $*VM.properties, "We have properties" if $isjvm; | ||
| #?rakudo todo 'no VM.desc yet' | ||
| ok $*VM.desc, "Description is '{$*VM.desc}'"; | ||
| ok $*VM.precomp-ext, "Extension is '{$*VM.precomp-ext}'"; | ||
| ok $*VM.precomp-target, "Extension is '{$*VM.precomp-target}'"; | ||
|
|
||
| ok $*VM.perl, 'We can do a $*VM.perl'; | ||
| ok $*VM.gist, 'We can do a $*VM.gist'; | ||
|
|
||
| diag "'{$*VM.name}' is an unknown VM, please report" if ! | ||
| ok $*VM.name eq any($*PERL.VMnames), | ||
| "We know of the VM we are running under"; | ||
|
|
||
| isa_ok $*VM.version, Version; | ||
| #?rakudo todo 'no VM.signature yet' | ||
| isa_ok $*VM.signature, Blob; | ||
|
|
||
| ok $*VM, '$*VM exists'; | ||
| ok $*VM.perl, '$*VM.perl works'; | ||
| ok $*VM.gist, '$*VM.gist works'; | ||
| # vim: ft=perl6 |