From 82df1b08c42d40c79b0dbd1634e18786cad860da Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 14 Jan 2026 23:10:40 +0900 Subject: feat: support empty arguments of ## operator --- tests/macro_operators.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/macro_operators.sh') 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 + +#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 -- cgit v1.3-1-g0d28