Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test that "0" is now True, fix tests for non-string pod options
  • Loading branch information
labster committed Apr 10, 2015
1 parent 8be2a7a commit e35d2cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions S03-operators/context-forcers.t
Expand Up @@ -28,9 +28,9 @@ sub iis(Mu $a, Mu $b, $descr) {
iis ?(?""), False, "? context forcer works (10)";

iis ?"3", True, "? context forcer works (11)";
iis ?"0", False, "? context forcer works (12)";
iis ?"0", True, "? context forcer works (12)";
iis ?(?"3"), True, "? context forcer works (13)";
iis ?(?"0"), False, "? context forcer works (14)";
iis ?(?"0"), True, "? context forcer works (14)";

iis ?Mu, False, "? context forcer works (15)";
}
Expand Down
13 changes: 9 additions & 4 deletions S26-documentation/09-configuration.t
@@ -1,5 +1,5 @@
use Test;
plan 15;
plan 17;
my $r;

=begin pod
Expand All @@ -22,13 +22,18 @@ is $r.config<like>, 'head1';
is $r.config<formatted>, 'I';

=begin pod
=for pod :number(42) :zebras :!sheep
=for pod :number(42) :zebras :!sheep :feist<1 2 3 4>
=end pod

$r = $=pod[2].contents[0];
is $r.config<number>, 42;
is $r.config<zebras>.Bool, True;
is $r.config<sheep>.Bool, False;
#?rakudo skip 'non-string colonpair pod options'
{
is $r.config<zebras>, True;
is $r.config<sheep>, False;
isa_ok $r.config<sheep>, Bool;
isa_ok $r.config<feist>, List;
}

=begin pod
=for DESCRIPTION :title<presentation template>
Expand Down
4 changes: 2 additions & 2 deletions S32-str/bool.t
Expand Up @@ -6,14 +6,14 @@ nok ?'', "?'' is false";
isa_ok ?'', Bool, "?'' is Bool";
ok ?'hello', "?'hello' is true";
isa_ok ?'hello', Bool, "?'hello' is Bool";
nok ?'0', "?'0' is false";
ok ?'0', "?'0' is true";
isa_ok ?'0', Bool, "?'0' is Bool";

nok ''.Bool, "''.Bool is false";
isa_ok ''.Bool, Bool, "''.Bool is Bool";
ok 'hello'.Bool, "'hello'.Bool is true";
isa_ok 'hello'.Bool, Bool, "'hello'.Bool is Bool";
nok '0'.Bool, "'0'.Bool is false";
ok '0'.Bool, "'0'.Bool is true";
isa_ok '0'.Bool, Bool, "'0'.Bool is Bool";

# vim: ft=perl6

0 comments on commit e35d2cf

Please sign in to comment.