diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-04 21:40:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-04 22:30:44 +0900 |
| commit | 17809b0571a038ec9eba3fc3620ba77a38c98afd (patch) | |
| tree | 2bf7473a7a52ae9f3c9c7a14009524149a1b2214 /tests | |
| parent | 4c195b77b35e28f74e8fd48cb10c996b8d0c1097 (diff) | |
| download | ducc-17809b0571a038ec9eba3fc3620ba77a38c98afd.tar.gz ducc-17809b0571a038ec9eba3fc3620ba77a38c98afd.tar.zst ducc-17809b0571a038ec9eba3fc3620ba77a38c98afd.zip | |
feat: recursive macro expansion
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/119.sh | 2 | ||||
| -rw-r--r-- | tests/120.sh | 21 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tests/119.sh b/tests/119.sh index e1dcb80..be485cf 100644 --- a/tests/119.sh +++ b/tests/119.sh @@ -1,5 +1,3 @@ -#!/bin/bash - cat <<'EOF' > expected 1,0 1,1,1 diff --git a/tests/120.sh b/tests/120.sh new file mode 100644 index 0000000..b3724cd --- /dev/null +++ b/tests/120.sh @@ -0,0 +1,21 @@ +cat <<'EOF' > expected +42 +123 +EOF +test_diff <<'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 + int a = 123; + printf("%d\n", a); +} +EOF |
