summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/lib/filespec.t
blob: ca22d3e12ba6960208c958a57d9aa0ab81caea11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!./perl

BEGIN {
    $^O = '';
    chdir 't' if -d 't';
    @INC = '../lib';
}

print "1..4\n";

use File::Spec;


if (File::Spec->catfile('a','b','c') eq 'a/b/c') {
	print "ok 1\n";
} else {
	print "not ok 1\n";
}

use File::Spec::OS2;

if (File::Spec::OS2->catfile('a','b','c') eq 'a/b/c') {
	print "ok 2\n";
} else {
	print "not ok 2\n";
}

use File::Spec::Win32;

if (File::Spec::Win32->catfile('a','b','c') eq 'a\b\c') {
	print "ok 3\n";
} else {
	print "not ok 3\n";
}

use File::Spec::Mac;

if (File::Spec::Mac->catfile('a','b','c') eq 'a:b:c') {
	print "ok 4\n";
} else {
	print "not ok 4\n";
}

OpenPOWER on IntegriCloud