From 9946d1814f4af9ef67e5accd9404e0fc69290f6f Mon Sep 17 00:00:00 2001 From: JassJam <0139ne@gmail.com> Date: Mon, 23 Feb 2026 12:28:50 +0000 Subject: feat: add initial test files --- tests/projects/csharp/console/test.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/projects/csharp/console/test.lua (limited to 'tests/projects/csharp/console/test.lua') 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 -- cgit v1.3.1 From 800d9e9fb6891dcc861c24f17340f5a88209e2ea Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 17 Mar 2026 23:23:00 +0800 Subject: improve check test --- tests/projects/csharp/console/test.lua | 8 ++++---- tests/projects/csharp/console_with_runtime_json/test.lua | 8 ++++---- tests/projects/csharp/exe_with_library/test.lua | 8 ++++---- tests/projects/csharp/exe_with_package/test.lua | 8 ++++---- tests/projects/csharp/multiple_library/test.lua | 8 ++++---- tests/projects/csharp/web_project/test.lua | 8 ++++---- 6 files changed, 24 insertions(+), 24 deletions(-) (limited to 'tests/projects/csharp/console/test.lua') diff --git a/tests/projects/csharp/console/test.lua b/tests/projects/csharp/console/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/console/test.lua +++ b/tests/projects/csharp/console/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end diff --git a/tests/projects/csharp/console_with_runtime_json/test.lua b/tests/projects/csharp/console_with_runtime_json/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/console_with_runtime_json/test.lua +++ b/tests/projects/csharp/console_with_runtime_json/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end diff --git a/tests/projects/csharp/exe_with_library/test.lua b/tests/projects/csharp/exe_with_library/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/exe_with_library/test.lua +++ b/tests/projects/csharp/exe_with_library/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end diff --git a/tests/projects/csharp/exe_with_package/test.lua b/tests/projects/csharp/exe_with_package/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/exe_with_package/test.lua +++ b/tests/projects/csharp/exe_with_package/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end diff --git a/tests/projects/csharp/multiple_library/test.lua b/tests/projects/csharp/multiple_library/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/multiple_library/test.lua +++ b/tests/projects/csharp/multiple_library/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end diff --git a/tests/projects/csharp/web_project/test.lua b/tests/projects/csharp/web_project/test.lua index 5ab8adc69..e67becab3 100644 --- a/tests/projects/csharp/web_project/test.lua +++ b/tests/projects/csharp/web_project/test.lua @@ -1,10 +1,10 @@ -import("lib.detect.find_tool") +import("detect.sdks.find_dotnet") function test_build(t) - local dotnet = find_tool("dotnet") - if dotnet then + local dotnet = find_dotnet() + if dotnet and dotnet.sdkver then t:build() else - return t:skip("dotnet not found") + return t:skip("dotnet sdk not found") end end -- cgit v1.3.1 From c1e59483fabb0daef020f11964964e3686ea7a7e Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 17 Mar 2026 23:43:30 +0800 Subject: fix dotnet on msys --- tests/projects/csharp/console/test.lua | 3 +++ tests/projects/csharp/console_with_runtime_json/test.lua | 3 +++ tests/projects/csharp/exe_with_library/test.lua | 3 +++ tests/projects/csharp/exe_with_package/test.lua | 3 +++ tests/projects/csharp/multiple_library/test.lua | 3 +++ tests/projects/csharp/web_project/test.lua | 3 +++ 6 files changed, 18 insertions(+) (limited to 'tests/projects/csharp/console/test.lua') diff --git a/tests/projects/csharp/console/test.lua b/tests/projects/csharp/console/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/console/test.lua +++ b/tests/projects/csharp/console/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() diff --git a/tests/projects/csharp/console_with_runtime_json/test.lua b/tests/projects/csharp/console_with_runtime_json/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/console_with_runtime_json/test.lua +++ b/tests/projects/csharp/console_with_runtime_json/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() diff --git a/tests/projects/csharp/exe_with_library/test.lua b/tests/projects/csharp/exe_with_library/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/exe_with_library/test.lua +++ b/tests/projects/csharp/exe_with_library/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() diff --git a/tests/projects/csharp/exe_with_package/test.lua b/tests/projects/csharp/exe_with_package/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/exe_with_package/test.lua +++ b/tests/projects/csharp/exe_with_package/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() diff --git a/tests/projects/csharp/multiple_library/test.lua b/tests/projects/csharp/multiple_library/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/multiple_library/test.lua +++ b/tests/projects/csharp/multiple_library/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() diff --git a/tests/projects/csharp/web_project/test.lua b/tests/projects/csharp/web_project/test.lua index e67becab3..d909316b7 100644 --- a/tests/projects/csharp/web_project/test.lua +++ b/tests/projects/csharp/web_project/test.lua @@ -1,6 +1,9 @@ import("detect.sdks.find_dotnet") function test_build(t) + if is_subhost("msys") then + return t:skip("csharp not supported on msys") + end local dotnet = find_dotnet() if dotnet and dotnet.sdkver then t:build() -- cgit v1.3.1