Initial import from FreeBSD RELENG_4:
[dragonfly.git] / contrib / perl5 / t / lib / filespec.t
1 #!./perl
2
3 BEGIN {
4     $^O = '';
5     chdir 't' if -d 't';
6     @INC = '../lib';
7 }
8
9 print "1..4\n";
10
11 use File::Spec;
12
13
14 if (File::Spec->catfile('a','b','c') eq 'a/b/c') {
15         print "ok 1\n";
16 } else {
17         print "not ok 1\n";
18 }
19
20 use File::Spec::OS2;
21
22 if (File::Spec::OS2->catfile('a','b','c') eq 'a/b/c') {
23         print "ok 2\n";
24 } else {
25         print "not ok 2\n";
26 }
27
28 use File::Spec::Win32;
29
30 if (File::Spec::Win32->catfile('a','b','c') eq 'a\b\c') {
31         print "ok 3\n";
32 } else {
33         print "not ok 3\n";
34 }
35
36 use File::Spec::Mac;
37
38 if (File::Spec::Mac->catfile('a','b','c') eq 'a:b:c') {
39         print "ok 4\n";
40 } else {
41         print "not ok 4\n";
42 }
43