From acccacadd43f998d144865322eb2561698a2173d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 12 Oct 2023 22:49:05 +0800 Subject: add custom scopeapis test --- tests/apis/custom_scopeapis/.gitignore | 8 ++++++++ tests/apis/custom_scopeapis/src/main.cpp | 9 +++++++++ tests/apis/custom_scopeapis/xmake.lua | 13 +++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/apis/custom_scopeapis/.gitignore create mode 100644 tests/apis/custom_scopeapis/src/main.cpp create mode 100644 tests/apis/custom_scopeapis/xmake.lua diff --git a/tests/apis/custom_scopeapis/.gitignore b/tests/apis/custom_scopeapis/.gitignore new file mode 100644 index 000000000..152105761 --- /dev/null +++ b/tests/apis/custom_scopeapis/.gitignore @@ -0,0 +1,8 @@ +# Xmake cache +.xmake/ +build/ + +# MacOS Cache +.DS_Store + + diff --git a/tests/apis/custom_scopeapis/src/main.cpp b/tests/apis/custom_scopeapis/src/main.cpp new file mode 100644 index 000000000..7c435d251 --- /dev/null +++ b/tests/apis/custom_scopeapis/src/main.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main(int argc, char** argv) +{ + cout << "hello world!" << endl; + return 0; +} diff --git a/tests/apis/custom_scopeapis/xmake.lua b/tests/apis/custom_scopeapis/xmake.lua new file mode 100644 index 000000000..ae88c3f73 --- /dev/null +++ b/tests/apis/custom_scopeapis/xmake.lua @@ -0,0 +1,13 @@ +add_rules("mode.debug", "mode.release") + +interp_add_scopeapis("myscope.set_name", "myscope.add_list", {kind = "values"}) + +myscope("hello") + set_name("foo") + add_list("value1", "value2") + +target("test") + set_kind("binary") + add_files("src/*.cpp") + + -- cgit v1.3.1