Skip to content

Commit c3ab3f7

Browse files
committed
Let's see if it fixes the tests
Add a test for a compound culture satellite assembly.
1 parent 0d00539 commit c3ab3f7

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease, bool aot, bo
5050
new BuildItem ("EmbeddedResource", "Resource.es.resx") {
5151
TextContent = () => InlineData.ResxWithContents ("<data name=\"CancelButton\"><value>Cancelar</value></data>")
5252
},
53+
new BuildItem ("EmbeddedResource", "Resource.de-DE.resx") {
54+
TextContent = () => InlineData.ResxWithContents ("<data name=\"CancelButton\"><value>Abbrechen</value></data>")
55+
},
5356
new AndroidItem.TransformFile ("Transforms.xml") {
5457
// Remove two methods that introduced warnings:
5558
// Com.Balysv.Material.Drawable.Menu.MaterialMenuView.cs(214,30): warning CS0114: 'MaterialMenuView.OnRestoreInstanceState(IParcelable)' hides inherited member 'View.OnRestoreInstanceState(IParcelable?)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
@@ -163,6 +166,7 @@ public void DotNetBuild (string runtimeIdentifiers, bool isRelease, bool aot, bo
163166
helper.AssertContainsEntry ($"assemblies/{proj.ProjectName}.pdb", shouldContainEntry: !TestEnvironment.CommercialBuildAvailable && !isRelease);
164167
helper.AssertContainsEntry ($"assemblies/Mono.Android.dll", shouldContainEntry: expectEmbeddedAssembies);
165168
helper.AssertContainsEntry ($"assemblies/es/{proj.ProjectName}.resources.dll", shouldContainEntry: expectEmbeddedAssembies);
169+
helper.AssertContainsEntry ($"assemblies/de-DE/{proj.ProjectName}.resources.dll", shouldContainEntry: expectEmbeddedAssembies);
166170
foreach (var abi in rids.Select (AndroidRidAbiHelper.RuntimeIdentifierToAbi)) {
167171
helper.AssertContainsEntry ($"lib/{abi}/libmonodroid.so");
168172
helper.AssertContainsEntry ($"lib/{abi}/libmonosgen-2.0.so");

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Utilities/ArchiveAssemblyHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public int GetNumberOfAssemblies (bool forceRefresh = false, AndroidTargetArch a
389389
// Android doesn't allow us to put satellite assemblies in lib/{CULTURE}/assembly.dll.so, we must instead
390390
// mangle the name.
391391
fileTypeMarker = MonoAndroidHelper.MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER;
392-
fileName = $"{culture}-{fileName}";
392+
fileName = $"{culture}{MonoAndroidHelper.SATELLITE_CULTURE_END_MARKER_CHAR}{fileName}";
393393
}
394394

395395
var ret = new List<string> ();

src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.Basic.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public static string MakeZipArchivePath (string part1, ICollection<string>? path
199199
public const string MANGLED_ASSEMBLY_NAME_EXT = ".so";
200200
public const string MANGLED_ASSEMBLY_REGULAR_ASSEMBLY_MARKER = "lib_";
201201
public const string MANGLED_ASSEMBLY_SATELLITE_ASSEMBLY_MARKER = "lib-";
202+
public const string SATELLITE_CULTURE_END_MARKER_CHAR = "_";
202203

203204
/// <summary>
204205
/// Mangles APK/AAB entry name for assembly and their associated pdb and config entries in the

0 commit comments

Comments
 (0)