[test] Fix test on Android
authorMarek Habersack <grendel@twistedcode.net>
Tue, 21 Jul 2015 09:14:21 +0000 (11:14 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 21 Jul 2015 09:16:19 +0000 (11:16 +0200)
On Android application runs with its CWD set to / and so the path
test modified in this commit expects to find a path of the //one form
which is not what the combine operation returns.

mcs/class/Mono.Posix/Test/Mono.Unix/UnixPathTest.cs

index 5c288de14537acf8da009e9453536d79c00c1beb..c21348748dcbace4ecaa98b58e0591dfa6012e5a 100644 (file)
@@ -37,7 +37,7 @@ namespace MonoTests.Mono.Unix
                        Assert.AreEqual ("one", path);
 
                        path = UnixPath.Combine (current, "one");
-                       expected = current + DSC + "one";
+                       expected = (current == "/" ? String.Empty : current) + DSC + "one";
                        Assert.AreEqual (expected, path);
 
                        path = UnixPath.Combine ("one", current);