1 | #!/usr/bin/perl -w
|
---|
2 | #
|
---|
3 | # Tests ProjectBuilder::Log functions
|
---|
4 |
|
---|
5 | use strict;
|
---|
6 | use Test::More;
|
---|
7 | use ProjectBuilder::Base;
|
---|
8 |
|
---|
9 | is("tmp", "tmp", "temp test");
|
---|
10 | done_testing(1);
|
---|
11 | exit(0);
|
---|
12 |
|
---|
13 | use ProjectBuilder::Log;
|
---|
14 |
|
---|
15 | my $nt = 0;
|
---|
16 | # Acquires test data
|
---|
17 | my $logf = "combined.log";
|
---|
18 | if (!open(FILE, "< $logf")) {
|
---|
19 | die("Could not open file $logf\n");
|
---|
20 | }
|
---|
21 | my @lines = <FILE>;
|
---|
22 | close(FILE);
|
---|
23 |
|
---|
24 | my $log = new ProjectBuilder::Log;
|
---|
25 | $log->setCompleteLog(join("\n", @lines));
|
---|
26 | my $test = {
|
---|
27 | # Full URI
|
---|
28 | "svn+ssh://account\@machine.sdom.tld:8080/path/to/file" => ["svn+ssh","account","machine.sdom.tld","8080","/path/to/file"],
|
---|
29 | # Partial URI
|
---|
30 | "http://machine2/path1/to/anotherfile" => ["http","","machine2","","/path1/to/anotherfile"],
|
---|
31 | };
|
---|
32 |
|
---|
33 | my ($scheme, $account, $host, $port, $path);
|
---|
34 | foreach my $lines (split(/\n/,$log->summary)) {
|
---|
35 | #($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
|
---|
36 |
|
---|
37 | #is($scheme, $test->{$uri}[0], "pb_get_uri Test protocol $uri");
|
---|
38 | #$nt++;
|
---|
39 |
|
---|
40 | }
|
---|
41 |
|
---|
42 | #$ENV{'TMPDIR'} = "/tmp";
|
---|
43 | #pb_temp_init();
|
---|
44 | #like($ENV{'PBTMP'}, qr|/tmp/pb\.[0-9A-z]+|, "pb_temp_init Test");
|
---|
45 | #$nt++;
|
---|
46 |
|
---|
47 | done_testing($nt);
|
---|