From 5c56dcd60dcce02babbcba862d71f3f891a712a4 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 4 Apr 2024 00:59:22 +0800 Subject: add cjson test --- tests/projects/other/native_module_cjson/xmake.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/projects/other/native_module_cjson/xmake.lua (limited to 'tests/projects/other/native_module_cjson/xmake.lua') diff --git a/tests/projects/other/native_module_cjson/xmake.lua b/tests/projects/other/native_module_cjson/xmake.lua new file mode 100644 index 000000000..8768aca3e --- /dev/null +++ b/tests/projects/other/native_module_cjson/xmake.lua @@ -0,0 +1,12 @@ +add_rules("mode.debug", "mode.release") + +add_moduledirs("modules") + +target("test") + set_kind("binary") + add_files("src/*.cpp") + on_config(function (target) + import("lua.cjson", {always_build = true}) + print(cjson.decode('{"foo": 1, "bar": [1, 2, 3]}')) + end) + -- cgit v1.3.1