{
string TempFolder = Path.Combine (Path.GetTempPath (), "MonoTests.System.IO.Tests");
static readonly char DSC = Path.DirectorySeparatorChar;
- static bool MacOSX = false;
-
- [DllImport ("libc")]
- static extern int uname (IntPtr buf);
[TearDown]
public void TearDown ()
Directory.Delete (TempFolder, true);
Directory.CreateDirectory (TempFolder);
-#if !MOBILE
- // from XplatUI.cs
- IntPtr buf = Marshal.AllocHGlobal (8192);
- if (uname (buf) == 0)
- MacOSX = Marshal.PtrToStringAnsi (buf) == "Darwin";
- Marshal.FreeHGlobal (buf);
-#endif
}
public void TestCtr ()
} catch (FileNotFoundException) {
// Only run this test on platforms where /dev/zero exists
Assert.Ignore();
+ } catch (DirectoryNotFoundException) {
+ // Only run this test on platforms where /dev exists
+ Assert.Ignore();
}
// this shouldn't throw