-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run writingsystem tests against dotnet 8 (#1336)
* add dotnet 8 as a target framework for SIL.WritingSystems.Tests. * update test adapter to work in the presence of dotnet 8 * add a helper method to detect unknown cultures, use that instead of checking for "Unknown Language" in the name. Fixes a number of tests that were failing due to incorrectly detecting unknown cultures. * don't use ICU when running writing system tests as many of them are over specified and expect NLS (Windows only globalization) to be used instead of ICU. * update icu.net to 3.0.0-beta.296 * ensure build fails when dotnet test returns non-zero exit code * Update version of icu.net used by SIL.Windows.Forms.Keyboarding to 3.0.0-beta.296 * update appveyor.yml to use Visual Studio 2022
- Loading branch information
Showing
11 changed files
with
62 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Globalization; | ||
|
||
namespace SIL.WritingSystems | ||
{ | ||
public static class CultureInfoExtensions | ||
{ | ||
public static bool IsUnknownCulture(this CultureInfo cultureInfo) | ||
{ | ||
// Windows 10 changed the behavior of CultureInfo, in that unknown cultures no longer return a CultureInfo containing an "Unknown Language" indication. | ||
// The proper way to detect fully unknown cultures (for Windows 11 and prior) is to: | ||
// 1. Check for the custom culture flag | ||
// 2. Check if the three-letter language name is set to default | ||
// Source: https://stackoverflow.com/a/71388328/1964319 | ||
return cultureInfo.CultureTypes.HasFlag(CultureTypes.UserCustomCulture) && | ||
cultureInfo.ThreeLetterWindowsLanguageName == "ZZZ"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters