[Mono-list] Directory.cs : PathTooLongException not thrown.

Gonzalo Paniagua Javier gonzalo@ximian.com
Tue, 02 Mar 2004 11:07:11 -0500


El mar, 02-03-2004 a las 08:45, Rathna N escribió:
> Hi,
> I wrote a TestFixture to test PathTooLongException and executed same
> against .Net and Mono, 
>  
> In Mono methods in the Directory class, which are expected to throw
> PathTooLongException are not throwing this exception as it does in
> .NET. 
>  
> Different kinds of exceptions are thrown for same input instead of an
> expected PathTooLongException exception.
> For example,
> a. Create throws --> System.IO.IOException : Win32 IO returned
> ERROR_FILENAME_EXCED_RANGE and returned path is correct.
> b. Delete()  --> returns  "Win32 IO returned
> ERROR_FILENAME_EXCED_RANGE", but returned path is empty.
> c. Directory(path,true) --> returns
> "System.IO.DirectoryNotFoundException" and path returned is correct.
> d. Directory(path,false) --> returns  "Win32 IO returned
> ERROR_FILENAME_EXCED_RANGE", but returned path is empty.
>  
> and so on .....
>  
> Attached zip file contains 3 files.
> 1. PathTooLongExceptionTest.cs
> 2. mono output
> 3. .Net output.
>  
> Please guide me, if i should file separate bugs for individual
> methods?

Hi Rathna!

Those tests should be added to
mcs/class/corlib/Test/System.IO/DirectoryTest.cs.

I've just fixed the exception thrown for too long paths. For the other
test that fails, please, file a bug report.

Thanks!

-Gonzalo