Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add $?KERNEL/$*KERNEL tests
  • Loading branch information
lizmat committed May 31, 2014
1 parent 59845d7 commit fc9f3a5
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions S02-magicals/KERNEL.t
@@ -0,0 +1,56 @@
use v6;

use Test;

plan 30;

# $?KERNEL.name is the kernel we were compiled in.
#?rakudo skip 'unimpl $?KERNEL'
{
ok $?KERNEL.name, "We were compiled in '{$?KERNEL.name}'";
ok $?KERNEL.auth, "Authority is '{$?KERNEL.auth}'";
ok $?KERNEL.version, "Version is '{$?KERNEL.version}'";
ok $?KERNEL.signature, "Signature is '{$?KERNEL.signature}'";
ok $?KERNEL.desc, "Description is '{$?KERNEL.desc}'";
ok $?KERNEL.release, "Release info is '{$?KERNEL.release}'";
ok $?KERNEL.hardware, "Hardware info is '{$?KERNEL.hardware}'";
ok $?KERNEL.arch, "Architecture info is '{$?KERNEL.arch}'";
ok $?KERNEL.bits, "Number of bits is '{$?KERNEL.bits}'";

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

diag "'{$?KERNEL.name}' is an unknown KERNEL, please report" if !
ok $?KERNEL.name eq any($?PERL.KERNELnames),
"We know of the KERNEL we were compiled in";

isa_ok $?KERNEL.version, Version;
isa_ok $?KERNEL.signature, Blob;
isa_ok $?KERNEL.bits, Int;
}

ok $*KERNEL.name, "We are running under '{$*KERNEL.name}'";
ok $*KERNEL.auth, "Authority is '{$*KERNEL.auth}'";
ok $*KERNEL.version, "Version is '{$*KERNEL.version}'";
#?rakudo todo 'no Kernel.signature yet'
ok $*KERNEL.signature, "Signature is '{$*KERNEL.signature}'";
#?rakudo todo 'no Kernel.desc yet'
ok $*KERNEL.desc, "Description is '{$*KERNEL.desc}'";
ok $*KERNEL.release, "Release info is '{$*KERNEL.release}'";
ok $*KERNEL.hardware, "Hardware info is '{$*KERNEL.hardware}'";
ok $*KERNEL.arch, "Architecture info is '{$*KERNEL.arch}'";
ok $*KERNEL.bits, "Number of bits is '{$*KERNEL.bits}'";

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

diag "'{$*KERNEL.name}' is an unknown KERNEL, please report" if !
ok $*KERNEL.name eq any($*PERL.KERNELnames),
"We know of the KERNEL we are running under";

isa_ok $*KERNEL.version, Version;
#?rakudo todo 'no Kernel.signature yet'
isa_ok $*KERNEL.signature, Blob;
isa_ok $*KERNEL.bits, Int;

# vim: ft=perl6

0 comments on commit fc9f3a5

Please sign in to comment.