summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-01 23:29:57 +0800
committerruki <[email protected]>2026-04-01 23:29:57 +0800
commiteedaa8c079ee0eb4cf9175db5c51f11c2748dcfd (patch)
tree60595dd04b81c7c6bf74f8ddb6d52292b397febf /tests
parentf416451b312c06a3b9d48ea389450dfa9b11d376 (diff)
improve utils.replace
Diffstat (limited to 'tests')
-rw-r--r--tests/apis/add_files_replace/src/config.h2
-rw-r--r--tests/apis/add_files_replace/src/main.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/apis/add_files_replace/src/config.h b/tests/apis/add_files_replace/src/config.h
new file mode 100644
index 000000000..96d83f651
--- /dev/null
+++ b/tests/apis/add_files_replace/src/config.h
@@ -0,0 +1,2 @@
+#pragma once
+#define VERSION "1.0"
diff --git a/tests/apis/add_files_replace/src/main.c b/tests/apis/add_files_replace/src/main.c
index 8b6ee15b8..d2ac8f8ae 100644
--- a/tests/apis/add_files_replace/src/main.c
+++ b/tests/apis/add_files_replace/src/main.c
@@ -1,10 +1,9 @@
#include <stdio.h>
+#include "config.h"
-#ifndef REPLACED_VALUE
-#define REPLACED_VALUE "original"
-#endif
+#define HELLO "original"
int main(int argc, char** argv) {
- printf("hello %s!\n", REPLACED_VALUE);
+ printf("hello %s, %s!\n", HELLO, VERSION);
return 0;
}