develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH ext/File/Glob/t/basic.t]

Thread Next
From:
Norton Allen
Date:
July 9, 2001 14:09
Subject:
[PATCH ext/File/Glob/t/basic.t]
Message ID:
200107092116.RAA12010@bottesini.harvard.edu
ext/File/Glob/t/basic.t used the test directory "pteerslt"
and would fail if the directory already existed and was
non-empty. Unfortunately ext/Cwd/Cwd.t uses the same directory
name. It tries to be good and clean up after itself, but if
it reports a failed test, TEST terminates it early and it
hence does not clean up, leaving a trap for
ext/File/Glob/t/basic.t.

This patch simply changes the name of the directory used
by the later test to avoid the cross-coupling. Ideally
this test should probably check to see if the directory
exists already and complain bitterly if it does.

  -Norton Allen

*** ../ORIG/perl-11225/ext/File/Glob/t/basic.t	Tue Jun 26 09:27:12 2001
--- perl-11225/ext/File/Glob/t/basic.t	Mon Jul  9 17:02:42 2001
***************
*** 84,90 ****
      print "ok 6 # skipped\n";
  }
  else {
!     $dir = "pteerslt";
      mkdir $dir, 0;
      @a = bsd_glob("$dir/*", GLOB_ERR);
      #print "\@a = ", array(@a);
--- 84,90 ----
      print "ok 6 # skipped\n";
  }
  else {
!     $dir = "pteerslo";
      mkdir $dir, 0;
      @a = bsd_glob("$dir/*", GLOB_ERR);
      #print "\@a = ", array(@a);
***************
*** 132,139 ****
  print "ok 9\n";
  
  # GLOB_ALPHASORT (default) should sort alphabetically regardless of case
! mkdir "pteerslt", 0777;
! chdir "pteerslt";
  
  @f_names = qw(Ax.pl Bx.pl Cx.pl aY.pl bY.pl cY.pl);
  @f_alpha = qw(Ax.pl aY.pl Bx.pl bY.pl Cx.pl cY.pl);
--- 132,139 ----
  print "ok 9\n";
  
  # GLOB_ALPHASORT (default) should sort alphabetically regardless of case
! mkdir "pteerslo", 0777;
! chdir "pteerslo";
  
  @f_names = qw(Ax.pl Bx.pl Cx.pl aY.pl bY.pl cY.pl);
  @f_alpha = qw(Ax.pl aY.pl Bx.pl bY.pl Cx.pl cY.pl);
***************
*** 172,175 ****
  
  unlink @f_names;
  chdir "..";
! rmdir "pteerslt";
--- 172,175 ----
  
  unlink @f_names;
  chdir "..";
! rmdir "pteerslo";

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About