1#!/usr/bin/perl -w
2
3BEGIN {
4    unshift @INC, 't/lib';
5}
6
7use strict;
8use warnings;
9our (%INIT, %CUSTOM);
10
11use Test::More tests => 5;
12use File::Spec::Functions qw( catfile updir );
13use TAP::Parser;
14
15use_ok('MyGrammar');
16use_ok('MyResultFactory');
17
18my @t_path    = ();
19my $source    = catfile( @t_path, 't', 'source_tests', 'source' );
20my %customize = (
21    grammar_class        => 'MyGrammar',
22    result_factory_class => 'MyResultFactory',
23);
24my $p = TAP::Parser->new(
25    {   source => $source,
26        %customize,
27    }
28);
29ok( $p, 'new customized parser' );
30
31for my $key ( keys %customize ) {
32    is( $p->$key(), $customize{$key}, "customized $key" );
33}
34
35# TODO: make sure these things are propogated down through the parser...
36