diff options
| author | JassJam <[email protected]> | 2026-02-23 12:28:50 +0000 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-14 00:08:40 +0800 |
| commit | 9946d1814f4af9ef67e5accd9404e0fc69290f6f (patch) | |
| tree | f669ea003ab4947aabb7732696aefa4e62f5793c /tests/projects/csharp/console | |
| parent | 95fa1f158a4044b9851ce6c0f4ff21f3427ce83e (diff) | |
feat: add initial test files
Diffstat (limited to 'tests/projects/csharp/console')
| -rw-r--r-- | tests/projects/csharp/console/.gitignore | 6 | ||||
| -rw-r--r-- | tests/projects/csharp/console/src/Program.cs | 2 | ||||
| -rw-r--r-- | tests/projects/csharp/console/src/test.csproj | 9 | ||||
| -rw-r--r-- | tests/projects/csharp/console/test.lua | 10 | ||||
| -rw-r--r-- | tests/projects/csharp/console/xmake.lua | 6 |
5 files changed, 33 insertions, 0 deletions
diff --git a/tests/projects/csharp/console/.gitignore b/tests/projects/csharp/console/.gitignore new file mode 100644 index 000000000..6b8d3af38 --- /dev/null +++ b/tests/projects/csharp/console/.gitignore @@ -0,0 +1,6 @@ +.xmake/ +build/ +bin/ +obj/ +vsxmake*/ +.vs/ diff --git a/tests/projects/csharp/console/src/Program.cs b/tests/projects/csharp/console/src/Program.cs new file mode 100644 index 000000000..c7d5272d9 --- /dev/null +++ b/tests/projects/csharp/console/src/Program.cs @@ -0,0 +1,2 @@ +Console.WriteLine("hello xmake!"); + diff --git a/tests/projects/csharp/console/src/test.csproj b/tests/projects/csharp/console/src/test.csproj new file mode 100644 index 000000000..9dbab4973 --- /dev/null +++ b/tests/projects/csharp/console/src/test.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <OutputType>Exe</OutputType> + <TargetFramework>net8.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> +</Project> + diff --git a/tests/projects/csharp/console/test.lua b/tests/projects/csharp/console/test.lua new file mode 100644 index 000000000..5ab8adc69 --- /dev/null +++ b/tests/projects/csharp/console/test.lua @@ -0,0 +1,10 @@ +import("lib.detect.find_tool") + +function test_build(t) + local dotnet = find_tool("dotnet") + if dotnet then + t:build() + else + return t:skip("dotnet not found") + end +end diff --git a/tests/projects/csharp/console/xmake.lua b/tests/projects/csharp/console/xmake.lua new file mode 100644 index 000000000..25cd801f0 --- /dev/null +++ b/tests/projects/csharp/console/xmake.lua @@ -0,0 +1,6 @@ +add_rules("mode.debug", "mode.release") + +target("test") + set_kind("binary") + add_rules("csharp") + add_files("src/Program.cs", "src/test.csproj") |
