source: ProjectBuilder/devel/pb-modules/t/Base.t@ 1076

Last change on this file since 1076 was 1076, checked in by Bruno Cornec, 14 years ago

r3960@localhost: bruno | 2010-07-22 22:11:48 +0200

  • Fix a bug on pb_get_uri revealed by introduction of first successful set of tests ;-) (TBC)
  • Add support for mandriva 2010.1
File size: 574 bytes
Line 
1#!/usr/bin/perl -w
2#
3# Tests ProjectBuilder::Base functions
4
5use strict;
6use Test::More;
7use ProjectBuilder::Base;
8
9my $nt = 0;
10
11my $uri = "svn+ssh://account\@machine.sdom.tld:8080/path/to/file";
12my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
13
14is($scheme, "svn+ssh", "pb_get_uri Test protocol");
15$nt++;
16
17is($account, "account", "pb_get_uri Test account");
18$nt++;
19
20is($host, "machine.sdom.tld", "pb_get_uri Test host");
21$nt++;
22
23is($port, "8080", "pb_get_uri Test port");
24$nt++;
25
26is($path, "/path/to/file", "pb_get_uri Test path");
27$nt++;
28
29done_testing($nt);
Note: See TracBrowser for help on using the repository browser.