Author: robertj
Date: 2006-01-18 09:15:33 -0500 (Wed, 18 Jan 2006)
New Revision: 55723
Added:
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/ChangeLog
Modified:
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
Log:
Merged from HEAD r55720:55721
Copied: branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/ChangeLog
(from rev 55721, trunk/mcs/class/corlib/Test/Microsoft.Win32/ChangeLog)
Property changes on:
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/ChangeLog
___________________________________________________________________
Name: svn:eol-style
+ native
Modified:
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
===================================================================
---
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
2006-01-18 14:11:54 UTC (rev 55722)
+++
branches/mono-1-1-13/mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
2006-01-18 14:15:33 UTC (rev 55723)
@@ -3,9 +3,10 @@
//
// Authors:
// mei ([EMAIL PROTECTED])
+// Robert Jordan ([EMAIL PROTECTED])
//
// (C) 2005 mei
-// (C) 2004 Novell (http://www.novell.com)
+// (C) 2004, 2005 Novell (http://www.novell.com)
//
using NUnit.Framework;
@@ -14,22 +15,42 @@
namespace MonoTests.Microsoft.Win32
{
- [TestFixture]
- public class RegistryKeyTest
+ [TestFixture]
+ public class RegistryKeyTest
+ {
+ private const string mimeroot = @"MIME\Database\Content Type";
+ [Test]
+ [Category("NotWorking")]
+ // This will not work on Linux ever
+ public void TestGetValue ()
{
- private const string mimeroot =
@"MIME\Database\Content Type";
- [Test]
- [Category("NotWorking")]
- // This will not work on Linux ever
- public void TestGetValue ()
- {
- RegistryKey root =
Registry.ClassesRoot;
- RegistryKey key;
+ RegistryKey root = Registry.ClassesRoot;
+ RegistryKey key;
+
+ key = root.OpenSubKey (mimeroot + @"\audio/wav");
+ Assert.AreEqual (".wav", key.GetValue ("Extension"),
"GetValue #1");
+ key = root.OpenSubKey (mimeroot + @"\text/x-scriptlet");
+ Assert.AreEqual (null, key.GetValue ("Extension"),
"GetValue #2");
+ }
- key = root.OpenSubKey (mimeroot
+ @"\audio/wav");
- Assert.AreEqual (".wav",
key.GetValue ("Extension"), "GetValue #1");
- key = root.OpenSubKey (mimeroot
+ @"\text/x-scriptlet");
- Assert.AreEqual (null,
key.GetValue ("Extension"), "GetValue #2");
- }
+ //
+ // Unit test for bug #77212
+ //
+ [Test]
+ public void TestHandle ()
+ {
+ // this test is for Windows
+ int p = (int) Environment.OSVersion.Platform;
+ if ((p == 4) || (p == 128))
+ return;
+
+ // this regpath always exists under windows
+ RegistryKey k = Registry.CurrentUser
+ .OpenSubKey ("Software", false)
+ .OpenSubKey ("Microsoft", false)
+ .OpenSubKey ("Windows", false);
+
+ Assert.IsNotNull (k, "#01");
}
+ }
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches