[BUG] FileDirectory>>exists

Anthony Adachi adachipro at yahoo.com
Tue May 20 21:56:55 UTC 2003


Stephen Pair wrote:

>  >I'll leave it up to someone knowledgeable about
this
>  >class to submit a test case which illustrates the
>  >expected behaviour on this last issue.
>  
>  Here's a test case that passes on Windows and on
Linux (it's also
>  attached as a fileout):
>  
> 
FileDirectoryTests>>testDirectoryExistsWhenLikeNamedFileExists
>  
>  | testFileName |
>  [testFileName := self myAssuredDirectory
fullNameFor:
>  'zDirExistsTest.testing'.
>  (FileStream newFileNamed: testFileName) close.
>  
>  self should: [FileStream isAFileNamed:
testFileName].
>  self shouldnt: [(FileDirectory on: testFileName)
exists]]
>  ensure: [self myAssuredDirectory deleteFileNamed:
>  'zDirExistsTest.testing']

>  It should (IMO) be made to pass on the Mac as well.

It doesn't and fails running on a Mac OS 9.1 and
Squeak 3.5. Upon stepping into the failing test I
narrowed it down to this assertion:

self shouldnt: [(FileDirectory on: testFileName)
exists]]

Also, at that point, looking in the Finder I can see
that "zTestDir:zDirExistsTest.testing." exists.

Anthony

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Squeak-dev mailing list