VCP::TestUtils - support routines for VCP testing
Creates one or more temporary directories, which will be removed upon exit in an END block
assert_eq $test_name, $in, $out ;
dies with a useful diff in $@ is $in ne $out. Returns nothing.
Requires a diff that knows about the -d and -U options.
$guts = slurp $filename ;
@perl = perl_cmd
Returns a list containing the Perl executable and some options to reproduce the current Perl options , like -I.
@vcp = vcp_cmd
These are used to get rid of content or elements that are known to differ when comparing the revml fed in to a repository with the revml that comes out.
s_content $elt_type1, $elt_type2, ..., \$string1, \$string2, ..., $new_content ;
Changes the contents of the elements, since some things, like suer id or mod_time can't be the same after going through a repository.
If $new_val is not supplied, a constant string is used.
rm_elts $elt_type1, $elt_type2, ..., \$string1, \$string2 rm_elts $elt_type1, $elt_type2, ..., qr/$content_re/, \$string1, \$string2
Removes the specified elements from the strings, including leading whitespace and trailing line separators. If the optional $content_re regular expression is provided, then only elements containing that pattern will be removed.
$p4_options = p4_options $prefix ;
Returns a hash of options. $prefix should be unique to the calling program.
Returns true if the p4 is missing or too old (< 99.2).
launch_p4d $p4_options ;
Creates an empty repository and launches a p4d for it. The p4d will be killed and it's repository deleted on exit.
$cvs_options = cvs_options $prefix ;
returns the options needed to build and access a cvs repository.
init_cvs $cvs_options, $module_name ;
Creates a CVS repository containing an empty module. Also sets $ENV{LOGNAME} if it notices that we're running as root, so CVS won't give a "cannot commit files as 'root'" error. Tries "nobody", then "guest".
Copyright 2000, Perforce Software, Inc. All Rights Reserved.
This module and the VCP package are licensed according to the terms given in the file LICENSE accompanying this distribution, a copy of which is included in vcp.
2 POD Errors
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install VCP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCP
CPAN shell
perl -MCPAN -e shell install VCP
For more information on module installation, please visit the detailed CPAN module installation guide.