Studio:Test Script Perl Template: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Text replace - 'Category:Documentation' to 'Category:Studio:Documentation') |
||
(24 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
The following sample represents a starting point for perl test scripts. | The following sample represents a starting point for perl test scripts. | ||
{| class="wikitable" | |||
!Source | |||
|- | |||
| style="background-color: white;" | | |||
<source lang="perl"> | <source lang="perl"> | ||
= | =nd | ||
Brief summary... | |||
About: Description | |||
Here is some description text. It can have text that is *bolded* and _underlined_. | |||
About: Tests | |||
test case 1 - description of test case 1 | |||
test case 2 - description of test case 2 | |||
etc - more cases... | |||
About: Test Plan | |||
See <http://project-portal.s2technologies.com/index.php/MyTestPlan> | |||
About: Copyright | |||
Copyright 2008 S2 Technologies support@s2technologies.com. | |||
Copyright 2008 S2 Technologies | |||
=cut | =cut | ||
Line 49: | Line 37: | ||
BEGIN { | BEGIN { | ||
my $strideDir = $Registry->{"LMachine/SOFTWARE/S2 Technologies/STRIDE/InstallDir"} || $ENV{'STRIDE_DIR'}; | my $strideDir = $Registry->{"LMachine/SOFTWARE/S2 Technologies/STRIDE/InstallDir"} || $ENV{'STRIDE_DIR'}; | ||
$StrideLibDirectory = File::Spec->catdir($ | $StrideLibDirectory = File::Spec->catdir($strideDir, 'lib', 'perl'); | ||
} | } | ||
use lib $StrideLibDirectory; | use lib $StrideLibDirectory; | ||
</source> | </source> | ||
|} | |||
This template uses [http://www.naturaldocs.org NaturalDocs] for documentation, which is a utility for documenting diverse codebases (including perl, c++, javascript). The documentation can be generated for your files by invoking the [http://www.naturaldocs.org/running.html NaturalDocs Utility]. The code above produces the following HTML output: | |||
[[Image:NaturalDocs_Out_1.JPG|frame|none|Example NaturalDocs Output]] | |||
[Category: | [[Category:Studio:Documentation]] |
Latest revision as of 22:42, 20 August 2009
The following sample represents a starting point for perl test scripts.
Source |
---|
=nd
Brief summary...
About: Description
Here is some description text. It can have text that is *bolded* and _underlined_.
About: Tests
test case 1 - description of test case 1
test case 2 - description of test case 2
etc - more cases...
About: Test Plan
See <http://project-portal.s2technologies.com/index.php/MyTestPlan>
About: Copyright
Copyright 2008 S2 Technologies support@s2technologies.com.
=cut
use strict;
use warnings;
use Carp;
use Win32::TieRegistry(Delimiter=>"/");
use File::Spec;
use Win32::OLE;
Win32::OLE->Option(Warn => 3);
use vars qw( $StrideLibDirectory );
BEGIN {
my $strideDir = $Registry->{"LMachine/SOFTWARE/S2 Technologies/STRIDE/InstallDir"} || $ENV{'STRIDE_DIR'};
$StrideLibDirectory = File::Spec->catdir($strideDir, 'lib', 'perl');
}
use lib $StrideLibDirectory;
|
This template uses NaturalDocs for documentation, which is a utility for documenting diverse codebases (including perl, c++, javascript). The documentation can be generated for your files by invoking the NaturalDocs Utility. The code above produces the following HTML output: