use Test::More tests => 14;
BEGIN { use_ok( 'P4' ); }
# Load test utils
unshift( @INC, "." );
unshift( @INC, "t" );
require_ok( "p4test" );
my $test = new P4::Test;
my $p4 = $test->InitClient();
ok( defined( $p4 ) );
$p4->SetProg( $0 );
my %client;
#
# Number of fields here influences number of tests. Change with care...
#
$client{ 'Client' } = "foo";
$client{ 'Owner' } = "tony";
$client{ 'Root' } = "/home/tony";
$client{ 'View' } = [ "//depot/... //foo/..." ];
my $c = $p4->FormatClient( \%client );
ok( length( $c ) > 0 );
my $newclient = $p4->ParseClient( $c );
foreach my $k (keys %client)
{
ok( defined( $newclient->{ $k } ) );
if( ref( $newclient->{ $k } ) eq "ARRAY" )
{
for( my $i = 0; defined( $client{ $k }->[ $i ] ); $i++ )
{
is( $newclient->{ $k }->[ $i ], $client{ $k }->[ $i ] )
}
}
else
{
is( $newclient->{ $k }, $client{ $k } );
}
}
ok( ref( $newclient ) eq "P4::Spec" );
ok( grep( /Owner/, $newclient->PermittedFields() ) );
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 25173 | C. Thomas Tyler | Populate -o -r -S //p4perl/r18.2. | ||
| //p4perl/main/t/08-specs.t | |||||
| #3 | 25172 | C. Thomas Tyler | p4 copy from old main. | ||
| #2 | 25111 | C. Thomas Tyler |
Added P4Perl 2018.2, published from: http://ftp.perforce.com/perforce/r18.2/bin.tools/ |
||
| #1 | 21593 | C. Thomas Tyler |
Populate -o //guest/perforce_software/p4perl/main/... //p4perl/main/.... |
||
| //guest/perforce_software/p4perl/main/t/08-specs.t | |||||
| #1 | 15920 | Matt Attaway | Move p4perl files into the main directory | ||
| //guest/perforce_software/p4perl/t/08-specs.t | |||||
| #1 | 8486 | Paul Allen |
Initial population of P4PERL from: //depot/main/p4-perl/...@565514 //depot/main/p4-doc/user/p4perlnotes.txt@565514 |
||