[tests] Fix tests on OS/X
authorMarek Habersack <grendel@twistedcode.net>
Thu, 16 Jul 2015 15:52:29 +0000 (17:52 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Thu, 16 Jul 2015 15:56:14 +0000 (17:56 +0200)
OS/X, like Android, uses a symlink for the $TMP directory. The tests used to assume
that the link points to the /private/tmp directory (which is the case) but earlier
changes introduced here for Android employed a more generic mechanism to determine the
actual temporary directory.
This commit removes the '/private' prefix assumption from OS/X

mcs/class/corlib/Test/System.IO/FileStreamTest.cs

index 28080443ea07b9b343c23cd65a52fd26d529fa83..bdeae0ba3aa6a2db36a900e8832fc1c7854456e4 100644 (file)
@@ -124,9 +124,6 @@ namespace MonoTests.System.IO
                                Assert.Fail ("#B1");
                        } catch (FileNotFoundException ex) {
                                Assert.AreEqual (typeof (FileNotFoundException), ex.GetType (), "#B2");
-                               // under OSX 'var' is a symlink to 'private/var'
-                               if (MacOSX)
-                                       path = "/private" + path;
                                Assert.AreEqual (path, ex.FileName, "#B3");
                                Assert.IsNull (ex.InnerException, "#B4");
                                Assert.IsNotNull (ex.Message, "#B5");
@@ -180,9 +177,6 @@ namespace MonoTests.System.IO
                                Assert.Fail ("#B1");
                        } catch (FileNotFoundException ex) {
                                Assert.AreEqual (typeof (FileNotFoundException), ex.GetType (), "#B2");
-                               // under OSX 'var' is a symlink to 'private/var'
-                               if (MacOSX)
-                                       path = "/private" + path;
                                Assert.AreEqual (path, ex.FileName, "#B3");
                                Assert.IsNull (ex.InnerException, "#B4");
                                Assert.IsNotNull (ex.Message, "#B5");