Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

View File

@@ -37,6 +37,7 @@ namespace MonoTests.System.IO
static string path3;
static OsType OS;
static char DSC = Path.DirectorySeparatorChar;
static char ADSC = Path.AltDirectorySeparatorChar;
[SetUp]
public void SetUp ()
@@ -359,6 +360,12 @@ namespace MonoTests.System.IO
}
}
[Test]
public void GetDirectoryName_Replaces_AltDirectorySeparatorChar ()
{
Assert.AreEqual ($"foo{DSC}bar", Path.GetDirectoryName ($"foo{ADSC}bar{ADSC}dingus"), "#1");
}
[Test]
public void GetExtension ()
{
@@ -688,6 +695,11 @@ namespace MonoTests.System.IO
i, root + test [i, 0], ex.GetType ()));
}
}
// These cases require that we don't pass a root to GetFullPath - it should return the proper drive root.
string root4 = Path.GetPathRoot(Directory.GetCurrentDirectory());
Assert.AreEqual(root4, Path.GetFullPath(@"\"));
Assert.AreEqual(root4, Path.GetFullPath("/"));
}
[Test]