home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / ntcode / ntperlb / t / comp / env.nt < prev    next >
Encoding:
Text File  |  1995-05-19  |  383 b   |  21 lines

  1. #
  2. # Test that HOME and LOGDIR work for chdir
  3. #
  4.  
  5. print "1..2\n";
  6.  
  7. chop ($wd = `cd`);
  8.  
  9. ($up = $wd) =~ s,comp[\\/]$,,;
  10.  
  11. $ENV{'HOME'} = $up;
  12. $ENV{'LOGDIR'} = $wd;
  13.  
  14. chdir;
  15. chop ($here = `cd`);
  16. if ($here eq $up) {print "ok 1\n";} else {print "not ok 1\n";}
  17. undef($ENV{'HOME'});
  18.  
  19. chdir;
  20. chop ($here = `cd`);
  21. if ($here eq $wd) {print "ok 2\n";} else {print "not ok 2\n";}