From 386fef59fafbd1fd05e6907f100ba99cedf88822 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 2 Aug 2025 02:58:29 +0900 Subject: feat: allow #define to omit destination tokens --- tests/079.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/079.sh (limited to 'tests') diff --git a/tests/079.sh b/tests/079.sh new file mode 100644 index 0000000..4381f45 --- /dev/null +++ b/tests/079.sh @@ -0,0 +1,27 @@ +set -e + +cat <<'EOF' > expected +42 +EOF + +cat <<'EOF' > header.h +#ifndef HEADER_H +#define HEADER_H + +int f() { return 42; } + +#endif +EOF + +bash ../../test_diff.sh <<'EOF' +#include "header.h" +#include "header.h" +#include "header.h" + +int printf(); + +int main() { + printf("%d\n", HEADER_H HEADER_H HEADER_H f() HEADER_H HEADER_H HEADER_H); + return 0; +} +EOF -- cgit v1.2.3-70-g09d2