Unix and Linux Discussions Tagged with unix script |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
10,207 |
Shell Programming and Scripting |
|
|
|
3 |
2,327 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
2,851 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,989 |
Shell Programming and Scripting |
|
|
|
2 |
10,612 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
1,488 |
Shell Programming and Scripting |
|
|
|
7 |
3,627 |
UNIX for Advanced & Expert Users |
|
|
|
7 |
3,097 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
2,261 |
Shell Programming and Scripting |
|
|
|
4 |
2,349 |
Shell Programming and Scripting |
|
|
|
2 |
2,001 |
Shell Programming and Scripting |
|
|
|
4 |
2,501 |
Shell Programming and Scripting |
|
|
|
4 |
2,295 |
Shell Programming and Scripting |
|
|
|
4 |
2,519 |
Shell Programming and Scripting |
|
|
|
5 |
77,819 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,305 |
Shell Programming and Scripting |
|
|
|
3 |
1,766 |
Shell Programming and Scripting |
|
|
|
2 |
2,535 |
Programming |
|
|
|
1 |
5,535 |
Shell Programming and Scripting |
|
|
|
2 |
3,209 |
Shell Programming and Scripting |
|
|
|
3 |
1,355 |
Shell Programming and Scripting |
|
|
|
4 |
3,212 |
Shell Programming and Scripting |
|
|
|
7 |
4,715 |
Shell Programming and Scripting |
|
|
|
0 |
2,824 |
Homework & Coursework Questions |
|
|
|
1 |
2,993 |
Solaris |
|
|
|
2 |
2,057 |
Shell Programming and Scripting |
|
|
|
2 |
3,750 |
Red Hat |
|
|
|
5 |
6,996 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,723 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
9,108 |
Shell Programming and Scripting |
|
|
|
2 |
3,834 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,138 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,059 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,238 |
Cybersecurity |
|
|
|
1 |
4,198 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
3,461 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,314 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
4 |
51,089 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
14,180 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
17,673 |
UNIX for Dummies Questions & Answers |
Test::Script(3) User Contributed Perl Documentation Test::Script(3)
NAME
Test::Script - Basic cross-platform tests for scripts
DESCRIPTION
The intent of this module is to provide a series of basic tests for 80% of the testing you will need to do for scripts in the script (or
bin as is also commonly used) paths of your Perl distribution.
Further, it aims to provide this functionality 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 always work on that platform as well. Anything less than 100% is
considered unacceptable.
In doing so, it is hoped that Test::Script can become a module that you can safely make a dependency of all your modules, without risking
that your module won't 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
script_compiles( 'script/foo.pl', 'Main script compiles' );
The "script_compiles" test calls the script with "perl -c script.pl", 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 run 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.
script_runs
script_runs( 'script/foo.pl', 'Main script runs' );
The "script_runs" test executes the script with "perl script.pl" and checks that it returns success.
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.
The test will be run 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.
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
prove, <http://ali.as/>
COPYRIGHT
Copyright 2006 - 2009 Adam Kennedy.
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.
perl v5.16.3 2009-11-24 Test::Script(3)