File: Catmandu-Cmd-help.t

package info (click to toggle)
libcatmandu-perl 1.1000-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,440 kB
  • sloc: perl: 15,726; makefile: 25; sh: 5
file content (29 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use Test::Exception;
use App::Cmd::Tester;

my $pkg;

BEGIN {
    $pkg = 'Catmandu::Cmd::help';
    use_ok $pkg;
}
require_ok $pkg;

use Catmandu::CLI;

my @arguments = (
    [qw(help)], [qw(importer JSON)], [qw(exporter JSON)], [qw(store Hash)],
    [qw(fix set_field)], [qw(bind maybe)], [qw(condition exists)],
);

foreach my $args (@arguments) {
    my $result = test_app(qq|Catmandu::CLI| => $args);
    is $result->error, undef, join ' ', qw(catmandu help), @$args;
}

done_testing 2 + @arguments;