### ----------------------------------------------------
### -- PrettyDump
### -- Licenses: Artistic-2.0
### -- Authors: brian d foy, Raku Community
### -- File: t/03.Match.rakutest
### ----------------------------------------------------
use Test;
use PrettyDump;

plan 1;

my $p = PrettyDump.new;

my %outputs;

%outputs<Any> = Q/Match=(
	:from(2),
	:hash(Map=()),
	:list(List=()),
	:made(Any),
	:orig("abcdef"),
	:pos(4),
	:to(4)
)/;

%outputs<Mu> = Q/Match=(
	:from(2),
	:hash(Map=()),
	:list(List=()),
	:made(Mu),
	:orig("abcdef"),
	:pos(4),
	:to(4)
)/;

subtest 'Match' => {
    'abcdef' ~~ / cd /;
    ok $/ ~~ Match, 'Data structure is a Match';

    my $string = $p.dump: $/;
    isa-ok $string, Str, 'Got Str back';

    is $string, any( %outputs.values ), 'Dumping Match works';
},

# vim: expandtab shiftwidth=4


