From 79b83b2bd90c69acaf13110c2cd6ab76b47c9cba Mon Sep 17 00:00:00 2001 From: henbr Date: Sun, 19 Jan 2025 19:21:38 +0100 Subject: Fix extra new lines after switch with allman brace style --- tools/odinfmt/tests/allman/.snapshots/switch.odin | 17 +++++++++++++++++ tools/odinfmt/tests/allman/odinfmt.json | 3 +++ tools/odinfmt/tests/allman/switch.odin | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 tools/odinfmt/tests/allman/.snapshots/switch.odin create mode 100644 tools/odinfmt/tests/allman/odinfmt.json create mode 100644 tools/odinfmt/tests/allman/switch.odin (limited to 'tools') diff --git a/tools/odinfmt/tests/allman/.snapshots/switch.odin b/tools/odinfmt/tests/allman/.snapshots/switch.odin new file mode 100644 index 0000000..9eef4a9 --- /dev/null +++ b/tools/odinfmt/tests/allman/.snapshots/switch.odin @@ -0,0 +1,17 @@ +package allman + +main :: proc() { + num := 1 + + switch num { + case 0: + case 1: + } + + switch num { + case 0: + case 1: + } + + +} diff --git a/tools/odinfmt/tests/allman/odinfmt.json b/tools/odinfmt/tests/allman/odinfmt.json new file mode 100644 index 0000000..d6ebe98 --- /dev/null +++ b/tools/odinfmt/tests/allman/odinfmt.json @@ -0,0 +1,3 @@ +{ + "brace_style": "Allman" +} diff --git a/tools/odinfmt/tests/allman/switch.odin b/tools/odinfmt/tests/allman/switch.odin new file mode 100644 index 0000000..b68f9bc --- /dev/null +++ b/tools/odinfmt/tests/allman/switch.odin @@ -0,0 +1,18 @@ +package allman + +main :: proc() { + num := 1 + + switch num + { + case 0: + case 1: + } + + switch num { + case 0: + case 1: + } + + +} \ No newline at end of file -- cgit v1.2.3