home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / lib / filepath.t < prev    next >
Text File  |  2000-03-12  |  492b  |  29 lines

  1. #!./perl
  2.  
  3. BEGIN {
  4.     chdir 't' if -d 't';
  5.     unshift @INC, '../lib';
  6. }
  7.  
  8. use File::Path;
  9. use strict;
  10.  
  11. my $count = 0;
  12. use warnings;
  13.  
  14. print "1..4\n";
  15.  
  16. # first check for stupid permissions second for full, so we clean up
  17. # behind ourselves
  18. for my $perm (0111,0777) {
  19.     mkpath("foo/bar");
  20.     chmod $perm, "foo", "foo/bar";
  21.  
  22.     print "not " unless -d "foo" && -d "foo/bar";
  23.     print "ok ", ++$count, "\n";
  24.  
  25.     rmtree("foo");
  26.     print "not " if -e "foo";
  27.     print "ok ", ++$count, "\n";
  28. }
  29.