NAME
Test::Perinci::CmdLine - Common test suite for Perinci::CmdLine::{Lite,Classic,Inline}
VERSION
This document describes version 1.41 of Test::Perinci::CmdLine (from Perl distribution Test-Perinci-CmdLine), released on 2016-08-30.
FUNCTIONS
pericmd_ok(%args) -> [status, msg, result, meta]
Common test suite for Perinci::CmdLine::{Lite,Classic,Inline}.
This function is exported by default.
Arguments ('*' denotes required arguments):
class* => str
Which Perinci::CmdLine class are we testing.
exclude_tags => array[str]
include_tags => array[str]
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
run_test_groups(%args) -> [status, msg, result, meta]
Run groups of Perinci::CmdLine tests.
This function is not exported.
Arguments ('*' denotes required arguments):
class* => str
Which Perinci::CmdLine class are we testing.
cleanup_tempdir => bool
exclude_tags => array[str]
groups* => array
include_tags => array[str]
tempdir => str
If not specified, will create temporary directory with
File::Temp
'stempdir()
.
Returns an enveloped result (an array).
First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (result) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.
Return value: (any)
ENVIRONMENT
DEBUG => bool
If set to 1, then temporary files (e.g. generated scripts for testing) will not be cleaned up, so you can inspect them.
TEST_PERICMD_EXCLUDE_TAGS => str
To set default for pericmd_ok()
's exclude_tags
argument.
TEST_PERICMD_INCLUDE_TAGS => str
To set default for pericmd_ok()
's include_tags
argument.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Test-Perinci-CmdLine.
SOURCE
Source repository is at https://github.com/perlancar/perl-Test-Perinci-CmdLine.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Perinci-CmdLine
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
SEE ALSO
Supported Perinci::CmdLine backends: Perinci::CmdLine::Inline, Perinci::CmdLine::Lite, Perinci::CmdLine::Classic.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.