aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-01-14 23:10:40 +0900
committernsfisis <nsfisis@gmail.com>2026-01-17 00:27:28 +0900
commit82df1b08c42d40c79b0dbd1634e18786cad860da (patch)
treea2d2d9ab6aa9a03aa4e49b750fc597c0b3659c1c /tests
parentfda0d40f4d353ce91592b9a1526cb463a279b6f8 (diff)
downloadducc-82df1b08c42d40c79b0dbd1634e18786cad860da.tar.gz
ducc-82df1b08c42d40c79b0dbd1634e18786cad860da.tar.zst
ducc-82df1b08c42d40c79b0dbd1634e18786cad860da.zip
feat: support empty arguments of ## operator
Diffstat (limited to 'tests')
-rw-r--r--tests/macro_operators.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/macro_operators.sh b/tests/macro_operators.sh
index a6d0445..57e8564 100644
--- a/tests/macro_operators.sh
+++ b/tests/macro_operators.sh
@@ -107,3 +107,18 @@ int main() {
ASSERT_EQ(0, strcmp("FOO", BAZ));
}
EOF
+
+test_exit_code 0 <<'EOF'
+#include <helpers.h>
+
+#define CONCAT3(x, y, z) x##y##z
+#define FOO CONCAT3(, 2, 3)
+#define BAR CONCAT3(1, , 3)
+#define BAZ CONCAT3(1, 2, )
+
+int main() {
+ ASSERT_EQ(23, FOO);
+ ASSERT_EQ(13, BAR);
+ ASSERT_EQ(12, BAZ);
+}
+EOF