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

  1. #!./perl
  2.  
  3. print "1..4\n";
  4.  
  5. @ops = sort <op\\*>;
  6. $list = join(' ',@ops);
  7.  
  8. opendir(R, "op");
  9. @files = grep(/^[^.].*$/, readdir(R));
  10. closedir R;
  11. @files = sort @files;
  12. $otherway = "op\\" . join(" op\\", @files);
  13.  
  14. print $list eq $otherway ? "ok 1\n" : "not ok 1\n$list\n$otherway\n";
  15.  
  16. print $/ eq "\n" ? "ok 2\n" : "not ok 2\n";
  17.  
  18. while (sort <jskdfjskdfj* op\\* jskdjfjkosvk*>) {
  19.     $not = "not " unless $_ eq shift @ops;
  20.     $not = "not at all " if $/ eq "\0";
  21. }
  22. print "${not}ok 3\n";
  23.  
  24. print $/ eq "\n" ? "ok 4\n" : "not ok 4\n";
  25.