added tests for scripts
[catagits/CatalystX-HelpText.git] / t / script-tt2.t
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7 # setup library path
8 use FindBin qw($Bin);
9 use lib "$Bin/lib";
10
11 use_ok 'CatalystX::HelpText::Finder::TemplateToolkit';
12 my $path = "$Bin/lib/TestApp/root/";
13 my $key = CatalystX::HelpText::Finder::TemplateToolkit->new(template_search_dir => "$path")->find_helptext_keys_in_fn("$path/main");
14 is_deeply $key, ['fnoo'], 'key found';
15
16 use_ok 'CatalystX::HelpText::Finder::TemplateToolkit::Regexp';
17 $key = CatalystX::HelpText::Finder::TemplateToolkit->new(template_search_dir => "$path")->find_helptext_keys_in_fn("$path/main");
18 is_deeply $key, ['fnoo'], 'key found';
19
20 done_testing;