From f91a10ae153f41c46729605ecf0023d11ada07b8 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 29 Jul 2025 06:09:06 +0900 Subject: feat: implement empty statements (only semicolon) --- tests/064.sh | 6 ++---- tests/065.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 tests/065.sh (limited to 'tests') diff --git a/tests/064.sh b/tests/064.sh index 80fba4f..c3b6028 100644 --- a/tests/064.sh +++ b/tests/064.sh @@ -14,9 +14,7 @@ EOF bash ../../test_exit_code.sh 0 <<'EOF' int main() { - if (1) { - } else { - return 1; - } + if (1); + else return 1; } EOF diff --git a/tests/065.sh b/tests/065.sh new file mode 100644 index 0000000..b644bed --- /dev/null +++ b/tests/065.sh @@ -0,0 +1,8 @@ +set -e + +cat <<'EOF' > expected +EOF + +bash ../../test_diff.sh <<'EOF' +int main() { ; } +EOF -- cgit v1.2.3-70-g09d2