diff --git a/test/Spring/Spring.Core.Tests/Core/IO/FileSystemResourceTests.cs b/test/Spring/Spring.Core.Tests/Core/IO/FileSystemResourceTests.cs index 985abc33..bab2aa71 100644 --- a/test/Spring/Spring.Core.Tests/Core/IO/FileSystemResourceTests.cs +++ b/test/Spring/Spring.Core.Tests/Core/IO/FileSystemResourceTests.cs @@ -40,6 +40,14 @@ namespace Spring.Core.IO return new FileSystemResource(resourceName); } + [Test] + public void LeadingProtocolIsNotTreatedRelative() + { + FileSystemResource res = new FileSystemResource(@"file://\\server\share\samples\artfair\"); + FileSystemResource res2 = (FileSystemResource) res.CreateRelative(@"file://./index.html"); + Assert.AreEqual(new Uri(Path.Combine(Environment.CurrentDirectory, "index.html")).AbsolutePath, res2.Uri.AbsolutePath); + } + [Test] [ExpectedException(typeof (UriFormatException))] public void RelativeUncResourceTooManyBackLevels()