diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/apis/add_files_replace/xmake.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/apis/add_files_replace/xmake.lua b/tests/apis/add_files_replace/xmake.lua index 24b98e7cd..ee890c9f8 100644 --- a/tests/apis/add_files_replace/xmake.lua +++ b/tests/apis/add_files_replace/xmake.lua @@ -1,6 +1,16 @@ add_rules("mode.debug", "mode.release") + +-- test table replaces target("test") set_kind("binary") add_files("src/main.c", {rules = "utils.replace", replaces = { {'"original"', '"replaced"'}, }}) + +-- test function replaces +target("test2") + set_kind("binary") + add_files("src/main.c", {rules = "utils.replace", replaces = function (content) + content = content:gsub('"original"', '"func_replaced"') + return content + end}) |
