Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extended $?VM/$*VM and $?DISTRO/$*DISTRO testing
  • Loading branch information
lizmat committed May 31, 2014
1 parent 5b00752 commit 59845d7
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 5 deletions.
8 changes: 7 additions & 1 deletion S02-magicals/DISTRO.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 20;
plan 24;

=begin kwid
Expand All @@ -24,6 +24,9 @@ get a list of osnames that have actually passed tests.
ok $?DISTRO.desc, "Description is '{$?DISTRO.desc}'";
ok $?DISTRO.release, "Release info is '{$?DISTRO.release}'";

ok $?DISTRO.perl, 'We can do a $?DISTRO.perl';
ok $?DISTRO.gist, 'We can do a $?DISTRO.gist';

diag "'{$?DISTRO.name}' is an unknown DISTRO, please report" if !
ok $?DISTRO.name eq any($?PERL.DISTROnames),
"We know of the DISTRO we were compiled in";
Expand All @@ -42,6 +45,9 @@ ok $*DISTRO.signature, "Signature is '{$*DISTRO.signature}'";
ok $*DISTRO.desc, "Description is '{$*DISTRO.desc}'";
ok $*DISTRO.release, "Release info is '{$*DISTRO.release}'";

ok $*DISTRO.perl, 'We can do a $*DISTRO.perl';
ok $*DISTRO.gist, 'We can do a $*DISTRO.gist';

diag "'{$*DISTRO.name}' is an unknown DISTRO, please report" if !
ok $*DISTRO.name eq any($*PERL.DISTROnames),
"We know of the DISTRO we are running under";
Expand Down
57 changes: 53 additions & 4 deletions S02-magicals/VM.t
@@ -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

0 comments on commit 59845d7

Please sign in to comment.