This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline
[perl5.git] / os2 / os2_base.t
1 print "1.." . lasttest() . "\n";
2
3 $cwd = Cwd::sys_cwd();
4 print "ok 1\n";
5 print "not " unless -d $cwd;
6 print "ok 2\n";
7
8 $lpb = Cwd::extLibpath;
9 print "ok 3\n";
10 $lpb .= ';' unless $lpb and $lpb =~ /;$/;
11
12 $lpe = Cwd::extLibpath(1);
13 print "ok 4\n";
14 $lpe .= ';' unless $lpe and $lpe =~ /;$/;
15
16 Cwd::extLibpath_set("$lpb$cwd") or print "not ";
17 print "ok 5\n";
18
19 $lpb = Cwd::extLibpath;
20 print "ok 6\n";
21 $lpb =~ s#\\#/#g;
22 ($s_cwd = $cwd) =~ s#\\#/#g;
23
24 print "not " unless $lpb =~ /\Q$s_cwd/;
25 print "ok 7\n";
26
27 Cwd::extLibpath_set("$lpe$cwd", 1) or print "not ";
28 print "ok 8\n";
29
30 $lpe = Cwd::extLibpath(1);
31 print "ok 9\n";
32 $lpe =~ s#\\#/#g;
33
34 print "not " unless $lpe =~ /\Q$s_cwd/;
35 print "ok 10\n";
36
37 unshift @INC, 'lib';
38 require OS2::Process;
39 @l = OS2::Process::process_entry();
40 print "not " unless @l == 11;
41 print "ok 11\n";
42
43 # 1: FS 2: Window-VIO 
44 print "not " unless $l[9] == 1 or $l[9] == 2;
45 print "ok 12\n";
46
47 print "# $_\n" for @l;
48
49 sub lasttest {12}