[tests] Skip testing Environment.SpecialFolder.ProgramFiles in .NET due to a .NET issue.

Ref: https://github.com/dotnet/runtime/issues/41383

Fixes this link sdk test failure:

    [FAIL] SpecialFolder :   /Users/rolf/Library/Developer/CoreSimulator/Devices/0E45B8DF-05EF-47E7-A31F-3B829DEA2628/data/Containers/Data/Application/6454039E-D5F1-4C41-BF16-6C81CBAB1724/Applications
        Expected: True
        But was:  False
            at LinkSdk.LinkSdkRegressionTest.TestFolder(SpecialFolder folder, Boolean supported, Boolean exists, Boolean readOnly) in [...]/xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs:line 815
            at LinkSdk.LinkSdkRegressionTest.SpecialFolder() in [...]/xamarin-macios/tests/linker/ios/link sdk/LinkSdkRegressionTest.cs:line 900
This commit is contained in:
Rolf Bjarne Kvinge 2020-08-26 09:36:55 +02:00
Родитель 9cbf14500b
Коммит eb79bccd74
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -902,8 +902,10 @@ namespace LinkSdk {
Assert.That (path, Is.EqualTo ("/usr/share"), "path - CommonApplicationData");
// and the simulator is more lax
#if !NET // https://github.com/dotnet/runtime/issues/41383
path = TestFolder (Environment.SpecialFolder.ProgramFiles, readOnly: device);
Assert.That (path, Is.EqualTo ("/Applications"), "path - ProgramFiles");
#endif
path = TestFolder (Environment.SpecialFolder.UserProfile, readOnly: device);
var bundlePath = NSBundle.MainBundle.BundlePath;