7 use Test::More tests => 24;
11 my $cwd = Cwd::sys_cwd();
15 my $lpb = Cwd::extLibpath;
17 $lpb .= ';' unless $lpb and $lpb =~ /;$/;
19 my $lpe = Cwd::extLibpath(1);
21 $lpe .= ';' unless $lpe and $lpe =~ /;$/;
23 ok Cwd::extLibpath_set("$lpb$cwd");
25 $lpb = Cwd::extLibpath;
28 (my $s_cwd = $cwd) =~ s#\\#/#g;
30 like($lpb, qr/\Q$s_cwd/);
32 ok Cwd::extLibpath_set("$lpe$cwd", 1);
34 $lpe = Cwd::extLibpath(1);
38 like($lpe, qr/\Q$s_cwd/);
40 is(uc OS2::DLLname(1), uc $Config{dll_name});
41 like(OS2::DLLname, qr#\Q/$Config{dll_name}\E\.dll$#i );
42 (my $root_cwd = $s_cwd) =~ s,/t$,,;
43 like(OS2::DLLname, qr#^\Q$root_cwd\E(/t)?\Q/$Config{dll_name}\E\.dll#i );
44 is(OS2::DLLname, OS2::DLLname(2));
45 like(OS2::DLLname(0), qr#^(\d+)$# );
48 is(OS2::DLLname($_), OS2::DLLname($_, \&Cwd::extLibpath) ) for 0..2;
49 ok(not defined eval { OS2::DLLname $_, \&Cwd::cwd; 1 } ) for 0..2;
50 ok(not defined eval { OS2::DLLname $_, \&xxx; 1 } ) for 0..2;
51 print "1.." . lasttest() . "\n";
53 $cwd = Cwd::sys_cwd();
55 print "not " unless -d $cwd;
58 $lpb = Cwd::extLibpath;
60 $lpb .= ';' unless $lpb and $lpb =~ /;$/;
62 $lpe = Cwd::extLibpath(1);
64 $lpe .= ';' unless $lpe and $lpe =~ /;$/;
66 Cwd::extLibpath_set("$lpb$cwd") or print "not ";
69 $lpb = Cwd::extLibpath;
72 ($s_cwd = $cwd) =~ s#\\#/#g;
74 print "not " unless $lpb =~ /\Q$s_cwd/;
77 Cwd::extLibpath_set("$lpe$cwd", 1) or print "not ";
80 $lpe = Cwd::extLibpath(1);
84 print "not " unless $lpe =~ /\Q$s_cwd/;
89 my @l = OS2::Process::process_entry();
90 print "not " unless @l == 11;
94 print "not " unless $l[9] == 1 or $l[9] == 2;
97 print "# $_\n" for @l;