From 6a1e8acbb053f5bf1a908f5e4e836f36fff30a6a Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 26 Aug 2020 09:39:52 +0200 Subject: [PATCH] [tests] Adjust resources test to cope with the fact that only the invariant culture is currently shipping in .NET 5. (#9498) Ref: https://github.com/xamarin/xamarin-macios/issues/8906 This is the third of three steps to fix this test failure: EmbeddedResources.ResourcesTest [FAIL] Embedded : en-AU Expected string length 5 but was 7. Strings differ at index 0. Expected: "G'day" But was: "Welcome" -----------^ at EmbeddedResources.ResourcesTest.Embedded() in [...]/xamarin-macios/tests/EmbeddedResources/ResourcesTest.cs:line 45 --- tests/EmbeddedResources/ResourcesTest.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/EmbeddedResources/ResourcesTest.cs b/tests/EmbeddedResources/ResourcesTest.cs index 1a0cb7fc6f8f..efc332ddbdab 100644 --- a/tests/EmbeddedResources/ResourcesTest.cs +++ b/tests/EmbeddedResources/ResourcesTest.cs @@ -44,10 +44,14 @@ public void Embedded () Assert.AreEqual ("Welcome", manager.GetString ("String1", new CultureInfo ("en")), "en"); Assert.AreEqual ("G'day", manager.GetString ("String1", new CultureInfo ("en-AU")), "en-AU"); Assert.AreEqual ("Willkommen", manager.GetString ("String1", new CultureInfo ("de")), "de"); +#if !NET // https://github.com/xamarin/xamarin-macios/issues/8906 Assert.AreEqual ("Willkommen", manager.GetString ("String1", new CultureInfo ("de-DE")), "de-DE"); +#endif Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es")), "es"); +#if !NET // https://github.com/xamarin/xamarin-macios/issues/8906 Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-AR")), "es-AR"); Assert.AreEqual ("Bienvenido", manager.GetString ("String1", new CultureInfo ("es-ES")), "es-ES"); +#endif } } } \ No newline at end of file