aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-22 00:06:14 +0900
committernsfisis <nsfisis@gmail.com>2025-08-22 21:57:20 +0900
commit0ac6ac95283735dd70ebf55b26ef78a4c32c31de (patch)
treef4aa9c5c855fb31db29b95530454b994b6a78c2c /tests
parenta2da09917886860ed478f4b37c31543e869cbd64 (diff)
downloadducc-0ac6ac95283735dd70ebf55b26ef78a4c32c31de.tar.gz
ducc-0ac6ac95283735dd70ebf55b26ef78a4c32c31de.tar.zst
ducc-0ac6ac95283735dd70ebf55b26ef78a4c32c31de.zip
feat: partially support #if directive
Diffstat (limited to 'tests')
-rw-r--r--tests/097.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/097.sh b/tests/097.sh
new file mode 100644
index 0000000..00d67f2
--- /dev/null
+++ b/tests/097.sh
@@ -0,0 +1,20 @@
+set -e
+
+cat <<'EOF' > expected
+1
+EOF
+
+bash ../../test_diff.sh <<'EOF'
+int printf();
+
+#define A
+#define B
+
+int main() {
+#if defined A && defined(B)
+ printf("1\n");
+#else
+ printf("2\n");
+#endif
+}
+EOF