diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-16 03:08:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-16 03:08:54 +0900 |
| commit | f24c67c4bfc0e77fae9686cf44ab451ea05bf99d (patch) | |
| tree | 64e25432d26e266e61c46af0ffd758b5ddd3a4ee /tests | |
| parent | 84f2a4f3dcef5839a134fca417bc6ee1730aaf24 (diff) | |
| download | ducc-f24c67c4bfc0e77fae9686cf44ab451ea05bf99d.tar.gz ducc-f24c67c4bfc0e77fae9686cf44ab451ea05bf99d.tar.zst ducc-f24c67c4bfc0e77fae9686cf44ab451ea05bf99d.zip | |
feat: implement macro expansion with parameters
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/093.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/093.sh b/tests/093.sh new file mode 100644 index 0000000..50e20fa --- /dev/null +++ b/tests/093.sh @@ -0,0 +1,21 @@ +set -e + +cat <<'EOF' > expected +42 +246 +221 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +#define A(x) x +#define B(x) x+x +#define C(x, y) x*y + +int main() { + printf("%d\n", A(42)); + printf("%d\n", B(123)); + printf("%d\n", C(13, 17)); +} +EOF |
