Skip to content

Commit 04ea048

Browse files
committed
Special Char Unit Test [WIP]
1 parent fe8c851 commit 04ea048

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Xamarin.Android.Prepare
1515
//
1616
partial class Configurables
1717
{
18-
const string BinutilsVersion = "2.37-XA.1";
18+
const string BinutilsVersion = "2.35.2-XA.1";
1919

2020
const string MicrosoftOpenJDK11Version = "11.0.10";
2121
const string MicrosoftOpenJDK11Release = "9.1";

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,27 @@ public void BuildBasicApplication ([ValueSource (nameof (SupportedTargetFramewor
5959
}
6060
}
6161

62+
[Test]
63+
[Category ("SmokeTests")]
64+
public void SmokeTestBuildWithSpecialCharacters ([Values (false, true)] bool forms)
65+
{
66+
var testName = "テスト";
67+
68+
var rootPath = Path.Combine (Root, "temp", TestName);
69+
var proj = forms ?
70+
new XamarinFormsAndroidApplicationProject () :
71+
new XamarinAndroidApplicationProject ();
72+
proj.ProjectName = testName;
73+
proj.IsRelease = true;
74+
if (forms) {
75+
proj.PackageReferences.Clear ();
76+
proj.PackageReferences.Add (KnownPackages.XamarinForms_4_7_0_1142);
77+
}
78+
using (var builder = CreateApkBuilder (Path.Combine (rootPath, proj.ProjectName))){
79+
Assert.IsTrue (builder.Build (proj), "Build should have succeeded.");
80+
}
81+
}
82+
6283
public static string GetLinkedPath (ProjectBuilder builder, bool isRelease, string filename)
6384
{
6485
return Builder.UseDotNet && isRelease ?

tests/MSBuildDeviceIntegration/Tests/InstallAndRunTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,26 @@ public void MonoSymbolicateAndroidStackTrace ()
178178
}) ;
179179
}
180180

181+
[Test]
182+
[Category ("UsesDevice"), Category ("SmokeTests")]
183+
public void SmokeTestBuildAndRunWithSpecialCharacters ()
184+
{
185+
AssertHasDevices ();
186+
var testName = "テスト";
187+
188+
var rootPath = Path.Combine (Root, "temp", TestName);
189+
var proj = new XamarinFormsAndroidApplicationProject () {
190+
ProjectName = testName,
191+
IsRelease = true,
192+
};
193+
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
194+
proj.SetDefaultTargetDevice ();
195+
using (var builder = CreateApkBuilder (Path.Combine (rootPath, proj.ProjectName))){
196+
Assert.IsTrue (builder.Install (proj), "Install should have succeeded.");
197+
Assert.True (builder.RunTarget (proj, "_Run", doNotCleanupOnUpdate: true), "Project should have run.");
198+
}
199+
}
200+
181201
[Test, Category ("MonoSymbolicate")]
182202
public void MonoSymbolicateNetStandardStackTrace ()
183203
{

0 commit comments

Comments
 (0)