NAME
Test::Script - Highly cross-platform basic tests for script
DESCRIPTION
This module is experimental and may not perform as advertised... yet
API may change in future without notice
YOU HAVE BEEN WARNED
The intent of this module is to provide a series of basic tests for scripts in the bin directory of your Perl distribution.
Further, it aims to provide them with perfect platform-compatibility and in a way that is as unobtrusive as possible.
That is, if the program works on a platform, then Test::Script should also work on that platform.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of your module, without risking your module not working on some platform because of the dependency.
Where a clash exists between wanting more functionality and maintaining platform safety, this module will err on the side of platform safety.
FUNCTIONS
script_compiles_ok
script_compiles_ok( 'bin/foo', 'Main script compiles' );
The script_compiles_ok
test calls the script with "perl -c scriptname", and checks that it returns without error.
The path it should be passed is a relative unix-format script name. This will be localised when running perl -c
, and if the test fails, the local name used will be shown in the diagnostic output.
Note also that the test will be actually done with the same perl interpreter that is running the test script (and not with the default system perl). This will also be shown in the diagnostic output on failure.
TO DO
- Make this work properly
- This module does not itself have tests
- Test on as many platforms as possible
SUPPORT
All bugs should be filed via the bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Script
For other issues, or commercial enhancement and support, contact the author
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
COPYRIGHT
Copyright 2006 Adam Kennedy. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.