use Test::More tests => 5;
BEGIN { use_ok('P4'); } ## test 1
# Load test utils
unshift( @INC, "." );
unshift( @INC, "t" );
require_ok("p4test"); ## test 2
my $test = new P4::Test;
my $p4 = $test->InitClient();
ok( defined($p4) ); ## test 3
ok( $p4->Connect() ); ## test 4
## Fetch user object and format to string
my $userStr = $p4->FormatUser($p4->FetchUser());
## Add 'Custom' field to spec
$userStr .= "\nCustom: foo\n";
## load custom spec, to simulate %specdef%
my $spec = "User;code:651;rq;ro;seq:1;len:32;;Type;code:659;ro;fmt:R;len:10;;Email;code:652;fmt:R;rq;seq:3;len:32;;Update;code:653;fmt:L;type:date;ro;seq:2;len:20;;Access;code:654;fmt:L;type:date;ro;len:20;;FullName;code:655;fmt:R;type:line;rq;len:32;;JobView;code:656;type:line;len:64;;Password;code:657;len:32;;AuthMethod;code:662;fmt:L;len:10;val:perforce/ldap;;Custom;code:999;fmt:L;len:10;val:bar;;Reviews;code:658;type:wlist;len:64;;";
$p4->DefineSpec('user', $spec);
ok( $p4->ParseUser($userStr) ); ## test 5
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 25173 | C. Thomas Tyler | Populate -o -r -S //p4perl/r18.2. | ||
| //p4perl/main/t/60-define-spec.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/60-define-spec.t | |||||
| #1 | 19372 | Paul Allen | Update with P16.1 changes. | ||