mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
Fixes #3592. DateField unit tests fail on macos.latest.
This commit is contained in:
@@ -175,12 +175,6 @@ public class DateFieldTests
|
||||
[Fact]
|
||||
public void Using_All_Culture_StandardizeDateFormat ()
|
||||
{
|
||||
// BUGBUG: This is a workaround for the issue with the date separator in macOS. See https://github.com/gui-cs/Terminal.Gui/issues/3592
|
||||
if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CultureInfo cultureBackup = CultureInfo.CurrentCulture;
|
||||
|
||||
DateTime date = DateTime.Parse ("1/1/1971");
|
||||
@@ -194,7 +188,10 @@ public class DateFieldTests
|
||||
{
|
||||
separator = separator.Replace ("\u200f", "");
|
||||
}
|
||||
|
||||
else if (culture.Name == "ar-SA" && RuntimeInformation.IsOSPlatform (OSPlatform.OSX))
|
||||
{
|
||||
separator = " ";
|
||||
}
|
||||
|
||||
string format = culture.DateTimeFormat.ShortDatePattern;
|
||||
var df = new DateField (date);
|
||||
@@ -207,6 +204,14 @@ public class DateFieldTests
|
||||
case "ar-SA":
|
||||
Assert.Equal ($" 04{separator}11{separator}1390", df.Text);
|
||||
|
||||
break;
|
||||
case "en-SA" when RuntimeInformation.IsOSPlatform (OSPlatform.OSX):
|
||||
Assert.Equal ($" 04{separator}11{separator}1390", df.Text);
|
||||
|
||||
break;
|
||||
case "en-TH" when RuntimeInformation.IsOSPlatform (OSPlatform.OSX):
|
||||
Assert.Equal ($" 01{separator}01{separator}2514", df.Text);
|
||||
|
||||
break;
|
||||
case "th":
|
||||
case "th-TH":
|
||||
|
||||
Reference in New Issue
Block a user