### ----------------------------------------------------
### -- RakuDoc::Load
### -- Licenses: Artistic-2.0
### -- Authors: Tom Browder
### -- File: t/4-rakudoc.rakutest
### ----------------------------------------------------
use Test;
use RakuDoc::Load;

my $r = q:to/HERE/;
=begin rakudoc
I am fully RakuDoc capable, but Raku is NOT!
=end rakudoc
HERE

my @rakudoc = load $r;
my $rakudoc = @rakudoc.head;
my @s = $rakudoc.contents;
is @s.elems, 1;
my $s = @s.head;
isa-ok $s, Pod::Block::Para;
say $s;
say $s.gist;
my @lines = $s.gist.lines;
isa-ok @lines, List;
for @lines.kv -> $i, $v {
    say "line $i: '$v'";
}
my $str = @lines.tail.trim;
my $exp = "I am fully RakuDoc capable, but Raku is NOT!";
is $str, $exp;

done-testing;


