From bb484d2310acf5c31792cfc16b887f4746a64816 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 2 Aug 2025 14:19:07 +0900 Subject: feat: implement postfix increment/decrement operator --- tests/080.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/080.sh (limited to 'tests') diff --git a/tests/080.sh b/tests/080.sh new file mode 100644 index 0000000..ed649da --- /dev/null +++ b/tests/080.sh @@ -0,0 +1,30 @@ +set -e + +cat <<'EOF' > expected +44 +44 +46 +46 +44 +42 +42 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +int main() { + int a = 42; + ++a; + a++; + printf("%d\n", a); + printf("%d\n", a++); + printf("%d\n", ++a); + printf("%d\n", a); + --a; + a--; + printf("%d\n", a--); + printf("%d\n", --a); + printf("%d\n", a); +} +EOF -- cgit v1.2.3-70-g09d2