diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-13 00:05:12 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-13 01:38:56 +0900 |
| commit | 8de7fa9da5fd8015f4fcc826b9270061b7b89478 (patch) | |
| tree | ec9c1e56f179be207c31a113a0a96210f7509431 /tests/test_function_macros.sh | |
| parent | d41a97e957ef616d194f60b9b79820cd0162d920 (diff) | |
| download | ducc-8de7fa9da5fd8015f4fcc826b9270061b7b89478.tar.gz ducc-8de7fa9da5fd8015f4fcc826b9270061b7b89478.tar.zst ducc-8de7fa9da5fd8015f4fcc826b9270061b7b89478.zip | |
feat: implement -E flag (preprocess only)
Diffstat (limited to 'tests/test_function_macros.sh')
| -rw-r--r-- | tests/test_function_macros.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_function_macros.sh b/tests/test_function_macros.sh index 4bc0cc2..1108650 100644 --- a/tests/test_function_macros.sh +++ b/tests/test_function_macros.sh @@ -83,19 +83,24 @@ int main() { EOF cat <<'EOF' > expected -42 -123 +int printf ( const char *, ...); + +int main () { + int foo = 42; + printf ( %d\n, foo); + + int a = 123; + printf ( %d\n, a); +} EOF -test_diff <<'EOF' +test_cpp <<'EOF' int printf(const char*, ...); int main() { - // TODO: check if "foo" is expanded to "foo" or not once '#' operator is implemented. #define foo foo int foo = 42; printf("%d\n", foo); - // TODO: check if "a" is expanded to "a" or not once '#' operator is implemented. #define a b #define b c #define c a @@ -103,4 +108,3 @@ int main() { printf("%d\n", a); } EOF - |
