source: devel/pb-modules/t/Log.t @ 1090

Last change on this file since 1090 was 1090, checked in by Bruno Cornec, 10 years ago

r4004@localhost: bruno | 2010-09-06 00:18:33 +0200

  • Fix #66: Adds log management (contribution from joachim). Starting point, as some more work has to be done around it.
File size: 1.1 KB
Line 
1#!/usr/bin/perl -w
2#
3# Tests ProjectBuilder::Log functions
4
5use strict;
6use Test::More;
7use ProjectBuilder::Base;
8
9is("tmp", "tmp", "temp test");
10done_testing(1);
11exit(0);
12
13use ProjectBuilder::Log;
14
15my $nt = 0;
16# Acquires test data
17my $logf = "combined.log";
18if (!open(FILE, "< $logf")) {
19    die("Could not open file $logf\n");
20}
21my @lines = <FILE>;
22close(FILE);
23
24my $log = new ProjectBuilder::Log;
25$log->setCompleteLog(join("\n", @lines));
26my $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
33my ($scheme, $account, $host, $port, $path);
34foreach 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
47done_testing($nt);
Note: See TracBrowser for help on using the repository browser.