diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-27 00:06:30 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-27 00:44:56 +0900 |
| commit | f030b6c546cc163c4b90a97aa399ffb9c1f6eeae (patch) | |
| tree | 3b4b1d86cf2b1eee0a37932ae19a58860deb80f3 /tests/100.sh | |
| parent | 022b9404fe60e2acaf55b7c35abed4b06251a1a1 (diff) | |
| download | ducc-f030b6c546cc163c4b90a97aa399ffb9c1f6eeae.tar.gz ducc-f030b6c546cc163c4b90a97aa399ffb9c1f6eeae.tar.zst ducc-f030b6c546cc163c4b90a97aa399ffb9c1f6eeae.zip | |
feat: implement #elif* directives
Diffstat (limited to 'tests/100.sh')
| -rw-r--r-- | tests/100.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/100.sh b/tests/100.sh new file mode 100644 index 0000000..9df8476 --- /dev/null +++ b/tests/100.sh @@ -0,0 +1,44 @@ +cat <<'EOF' > expected +1 +1 +2 +3 +EOF + +test_diff <<'EOF' +int printf(); + +int main() { +#if 1 + printf("1\n"); +#elif 1 + printf("2\n"); +#else + printf("3\n"); +#endif + +#if 1 + printf("1\n"); +#elif 0 + printf("2\n"); +#else + printf("3\n"); +#endif + +#if 0 + printf("1\n"); +#elif 1 + printf("2\n"); +#else + printf("3\n"); +#endif + +#if 0 + printf("1\n"); +#elif 0 + printf("2\n"); +#else + printf("3\n"); +#endif +} +EOF |
