From eb22f9bbc2f2596c2c690960852e29eaed04ea09 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 19 Aug 2025 07:51:50 +0900 Subject: feat: skip a pair of backslash and new-line --- tests/096.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/096.sh (limited to 'tests') diff --git a/tests/096.sh b/tests/096.sh new file mode 100644 index 0000000..8bd6848 --- /dev/null +++ b/tests/096.sh @@ -0,0 +1,41 @@ +set -e + +cat <<'EOF' > expected +10 20 +100 300 500 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); +in\ +t ma\ +in() { + int x = 1\ +0; + + int y = 2\ +\ +\ +0; + +#def\ +ine X 100 +#define Y 100 + \ +200 +#define Z /* +*/ 500 + // comment \ + x *= 100, y *= 200; + /* comment *\ +/ + + printf("%d %d\n", x, y); + printf("%d %d %d\n", X, Y, Z); +} +EOF + +cat <<'EOF' > expected +main.c:1: expected, but got +EOF + +echo -n 'int main() {}\' | bash ../../test_compile_error.sh -- cgit v1.2.3-70-g09d2