Browse Source

2005-06-05 Gonzalo Paniagua Javier <[email protected]>

	* FileTest.cs: on unix there are no invalid chars and we were trying
	to index beyond the end of the array.


svn path=/trunk/mcs/; revision=45455
Gonzalo Paniagua Javier 20 years ago
parent
commit
a26cbbe5e0

+ 5 - 0
mcs/class/corlib/Test/System.IO/ChangeLog

@@ -1,3 +1,8 @@
+2005-06-05 Gonzalo Paniagua Javier <[email protected]>
+
+	* FileTest.cs: on unix there are no invalid chars and we were trying
+	to index beyond the end of the array.
+
 2005-06-05 Gonzalo Paniagua Javier <[email protected]>
 
 	* FileTest.cs: removed duplicate test. The same thing is done in

+ 2 - 2
mcs/class/corlib/Test/System.IO/FileTest.cs

@@ -1024,8 +1024,8 @@ namespace MonoTests.System.IO
 		// On Unix there are no invalid path chars.
 		public void SetCreationTimeArgumenException3 ()
 		{
-
-			File.SetCreationTime (Path.InvalidPathChars [1].ToString (), new DateTime (2000, 12, 12, 11, 59, 59));
+			if (Path.InvalidPathChars.Length > 1)
+				File.SetCreationTime (Path.InvalidPathChars [1].ToString (), new DateTime (2000, 12, 12, 11, 59, 59));
 		}
 
 		[Test]