Skip to content

Commit 8d5b045

Browse files
committed
Microsoft.VisualBasic/Test: Accept other failures creating common appdata directory.
1 parent bac5187 commit 8d5b045

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

mcs/class/Microsoft.VisualBasic/Test/Microsoft.VisualBasic.FileIO/SpecialDirectoriesTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ public void PathTest()
4949
{
5050
// Must be admin to create this directory
5151
}
52+
catch (System.IO.IOException)
53+
{
54+
// Read-only filesystem
55+
}
5256
Assert.AreEqual (FixPath (System.Windows.Forms.Application.UserAppDataPath), SpecialDirectories.CurrentUserApplicationData, "CurrentUserApplicationData");
5357
Assert.AreEqual (FixPath (Environment.GetFolderPath (Environment.SpecialFolder.Desktop)), SpecialDirectories.Desktop, "Desktop");
5458
Assert.AreEqual (FixPath (Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments)), SpecialDirectories.MyDocuments, "MyDocuments");

mcs/class/Microsoft.VisualBasic/Test/Microsoft.VisualBasic.Logging/FileLogTraceListener.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public void FilenameTest ()
8080
{
8181
Assert.Ignore("Need to be admin to create common appdata directory");
8282
}
83+
catch (System.IO.IOException)
84+
{
85+
Assert.Ignore("Cannot create common appdata directory");
86+
}
8387

8488
log.Location = LogFileLocation.ExecutableDirectory;
8589
Assert.AreEqual (System.IO.Path.Combine (System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), log.BaseFileName) + ".log", log.FullLogFileName, "#A2");

mcs/class/Microsoft.VisualBasic/Test/Microsoft.VisualBasic.MyServices/SpecialDirectoriesProxyTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public void PathTest()
5151
{
5252
// Must be admin to create this directory
5353
}
54+
catch (System.IO.IOException)
55+
{
56+
// Read-only filesystem
57+
}
5458
Assert.AreEqual (FixPath (System.Windows.Forms.Application.UserAppDataPath), sd.CurrentUserApplicationData, "CurrentUserApplicationData");
5559
Assert.AreEqual (FixPath (Environment.GetFolderPath (Environment.SpecialFolder.Desktop)), sd.Desktop, "Desktop");
5660
Assert.AreEqual (FixPath (Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments)), sd.MyDocuments, "MyDocuments");

0 commit comments

Comments
 (0)