The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

testcomp - Test your tab completion

VERSION

This document describes version 0.09 of testcomp (from Perl distribution App-CompleteUtils), released on 2015-09-09.

SYNOPSIS

Usage (place caret sign (^) somewhere to place cursor):

 % testcomp [testcomp-options] -- <your-script> [your-script-options]^ ...
 % testcomp [testcomp-options] -- <your-script> '[your-script-options]^ ...'

Examples:

 % testcomp -- yourscript --opt1 val --opt2
 % testcomp -Ilib -- 'yourscript --opt1^  --opt2 val'

DESCRIPTION

This utility will run your script (finding it in PATH if not found in current directory) while setting COMP_LINE and COMP_POINT to test how your script will perform shell completion. In addition to that, it will also load Log::Any::Adapter::Screen and set TRACE=1 to let you see trace log messages.

You can place caret sign (^) somewhere in the argument to place cursor (set COMP_POINT)>. If no caret sign is present, COMP_POINT is put at the end of COMP_LINE.

OPTIONS

--include=dir, -I

Like Perl's -I.

SEE ALSO

App::CompleteUtils

You can use this utility to test scripts using these frameworks: Perinci::CmdLine, Getopt::Long::Complete, Getopt::Long::Subcommand. But actually all scripts which can complete itself by detecting COMP_LINE and COMP_POINT can be tested.

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/App-CompleteUtils.

SOURCE

Source repository is at https://github.com/perlancar/perl-App-CompleteUtils.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-CompleteUtils

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.

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 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.