Author: spouliot
Date: 2008-01-17 17:01:27 -0500 (Thu, 17 Jan 2008)
New Revision: 93210
Modified:
trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/ChangeLog
trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs
Log:
2008-01-17 Sebastien Pouliot <[EMAIL PROTECTED]>
* IsolatedStorageFileTest.cs: Added test case against regression of
bug #354539
Modified: trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/ChangeLog
2008-01-17 22:00:31 UTC (rev 93209)
+++ trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/ChangeLog
2008-01-17 22:01:27 UTC (rev 93210)
@@ -1,3 +1,8 @@
+2008-01-17 Sebastien Pouliot <[EMAIL PROTECTED]>
+
+ * IsolatedStorageFileTest.cs: Added test case against regression of
+ bug #354539
+
2007-11-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* IsolatedStorageFileStreamTest.cs: Test case for rooted paths by Jay
Modified:
trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs
===================================================================
---
trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs
2008-01-17 22:00:31 UTC (rev 93209)
+++
trunk/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs
2008-01-17 22:01:27 UTC (rev 93210)
@@ -29,6 +29,7 @@
using System;
using System.Collections;
+using System.IO;
using System.IO.IsolatedStorage;
using System.Reflection;
using System.Security;
@@ -386,5 +387,29 @@
ae.AddHost (new Zone (SecurityZone.Internet));
IsolatedStorageFile isf = IsolatedStorageFile.GetStore
(scope, null, null, ae, typeof (Zone));
}
+
+ [Test]
+ public void RegressionBNC354539 ()
+ {
+ string filename = "test-bnc-354539";
+ byte[] expected = new byte[] { 0x01, 0x42, 0x00 };
+ byte[] actual = new byte [expected.Length];
+
+ using (IsolatedStorageFile file =
IsolatedStorageFile.GetStore (IsolatedStorageScope.User |
IsolatedStorageScope.Assembly, null, null)) {
+ using (IsolatedStorageFileStream stream = new
IsolatedStorageFileStream (filename, FileMode.Create, FileAccess.Write,
FileShare.None, file)) {
+ stream.Write (expected, 0,
expected.Length);
+ }
+ }
+
+ using (IsolatedStorageFile file =
IsolatedStorageFile.GetUserStoreForAssembly ()) {
+ using (IsolatedStorageFileStream stream = new
IsolatedStorageFileStream (filename, FileMode.Open, FileAccess.Read,
FileShare.Read, file)) {
+ stream.Read (actual, 0, actual.Length);
+ }
+
+ file.DeleteFile (filename);
+ }
+
+ Assert.AreEqual (expected, actual);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches