t/000-module.t
changeset 1 9416fc33d2a0
parent 0 21a87c5f86e4
child 2 1bd03bcf26b4
equal deleted inserted replaced
0:21a87c5f86e4 1:9416fc33d2a0
    10 is($fops->type => "native", "type is native");
    10 is($fops->type => "native", "type is native");
    11 
    11 
    12 foreach (qw(type pwd cd)) {
    12 foreach (qw(type pwd cd)) {
    13     can_ok $fops => $_;
    13     can_ok $fops => $_;
    14 }
    14 }
       
    15 is($fops->pwd() => "/", "working dir is /");
       
    16 
       
    17 my @dir = (
       
    18     "////" => "/",
       
    19     "/.//./" => "/",
       
    20     "/.//./." => "/",
       
    21     "././/./." => "/",
       
    22     "/a/b/c/d/" => "/a/b/c/d",
       
    23     "/a/b/c/d" => "/a/b/c/d",
       
    24     ".."       => "/a/b/c",
       
    25 );
       
    26 
       
    27 while (@dir) {
       
    28     my $dir = shift @dir;
       
    29     my $pwd = shift @dir;
       
    30 
       
    31     ok($fops->cd($dir), "cd $dir");
       
    32     is($fops->pwd(), $pwd, "pwd should be $pwd");
       
    33 }
    15 
    34 
    16 
    35 
    17 done_testing;
    36 done_testing;