+2005-07-04 Sebastien Pouliot <sebastien@ximian.com>
+
+ * DirectoryInfoTest.cs: Added tests for getting parent of root
+ directories (using directory separators).
+
2005-07-02 Sebastien Pouliot <sebastien@ximian.com>
* DirectoryInfoTest.cs: Added tests for FullName (bug #75443).
public void FullName ()
{
DirectoryInfo di = new DirectoryInfo ("something");
+ Assert ("Exists", !di.Exists);
Assert ("FullName", di.FullName.EndsWith ("something"));
di = new DirectoryInfo ("something" + Path.DirectorySeparatorChar);
di = new DirectoryInfo ("something" + Path.AltDirectorySeparatorChar);
AssertEquals ("AltDirectorySeparatorChar", Path.DirectorySeparatorChar, di.FullName [di.FullName.Length - 1]);
}\r
+
+ [Test]
+ public void FullName_RootDirectory ()
+ {
+ DirectoryInfo di = new DirectoryInfo (String.Empty + Path.DirectorySeparatorChar);
+ if (Path.DirectorySeparatorChar == '/') {
+ // can't be sure of the root drive under windows
+ AssertEquals ("FullName", di.FullName, "/");
+ }
+ AssertNull ("Parent", di.Parent);
+
+ di = new DirectoryInfo (String.Empty + Path.AltDirectorySeparatorChar);
+ if (Path.DirectorySeparatorChar == '/') {
+ // can't be sure of the root drive under windows
+ AssertEquals ("FullName-Alt", di.FullName, "/");
+ }
+ AssertNull ("Parent-Alt", di.Parent);
+ }\r
\r
[Test]\r
public void GetDirectories1 ()\r