diff options
author | Gert Driesen <drieseng@users.sourceforge.net> | 2009-05-22 15:06:32 +0400 |
---|---|---|
committer | Gert Driesen <drieseng@users.sourceforge.net> | 2009-05-22 15:06:32 +0400 |
commit | 30241e72d5bca3f4448b8b53f89f563ed762b907 (patch) | |
tree | d67b5617711e88ce82587a45f5af8f28b9787b83 /mcs/class/System.XML/Test | |
parent | 0e09bcbf3c8b784f616294a19af25b29289eb542 (diff) |
* XmlResolverTest.cs: Fix ResolveUri test on Windows when current
directory is not on C drive.
svn path=/trunk/mcs/; revision=134593
Diffstat (limited to 'mcs/class/System.XML/Test')
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/mcs/class/System.XML/Test/System.Xml/ChangeLog b/mcs/class/System.XML/Test/System.Xml/ChangeLog index 48a501ae131..d2914d9c149 100644 --- a/mcs/class/System.XML/Test/System.Xml/ChangeLog +++ b/mcs/class/System.XML/Test/System.Xml/ChangeLog @@ -1,3 +1,8 @@ +2009-05-22 Gert Driesen <drieseng@users.sourceforge.net> + + * XmlResolverTest.cs: Fix ResolveUri test on Windows when current + directory is not on C drive. + 2009-05-12 Jonas Larsson <jonas.larsson@manodo.se> * XmlValidatingReaderTests.cs : test for bug #502168 diff --git a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs index b4358abcc7e..5865dbe07bc 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs @@ -74,9 +74,11 @@ namespace MonoTest.System.Xml { Uri uri = xr.ResolveUri (null, "/Moonlight"); // note: this is *very* different from [silver|moon]light Assert.IsTrue (uri.IsAbsoluteUri, "null,string"); - if (isWin32) - Assert.AreEqual ("file:///C:/Moonlight", uri.ToString (), "ToString"); - else + if (isWin32) { + string currentdir = Directory.GetCurrentDirectory (); + string volume = currentdir.Substring (0, 2); + Assert.AreEqual ("file:///" + volume + "/Moonlight", uri.ToString (), "ToString"); + } else Assert.AreEqual ("file:///Moonlight", uri.ToString (), "ToString"); uri = new Uri ("http://www.mono-project.com"); @@ -101,6 +103,6 @@ namespace MonoTest.System.Xml { u2 = xr.ResolveUri (null, "file:///mystuff"); Assert.IsTrue (u2.IsAbsoluteUri, "null,absolute/file"); } -#endif +#endif
} } |