aboutsummaryrefslogtreecommitdiff
path: root/tools/odinfmt/tests
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-08-21 00:30:45 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-08-21 00:30:45 +0200
commitb479b28b5d35220f7d21bd40e8dca21f1930db19 (patch)
tree90c1a564158f0419b1f43d070e593fda6b5e1af4 /tools/odinfmt/tests
parentf5fe104fd6662156c2cb219f24f17769af2d30e6 (diff)
fix odinfmt bugs
Diffstat (limited to 'tools/odinfmt/tests')
-rw-r--r--tools/odinfmt/tests/.snapshots/returns.odin16
-rw-r--r--tools/odinfmt/tests/returns.odin15
2 files changed, 30 insertions, 1 deletions
diff --git a/tools/odinfmt/tests/.snapshots/returns.odin b/tools/odinfmt/tests/.snapshots/returns.odin
index 0b6dd10..ddd8fef 100644
--- a/tools/odinfmt/tests/.snapshots/returns.odin
+++ b/tools/odinfmt/tests/.snapshots/returns.odin
@@ -26,3 +26,19 @@ returns_with_call_expression :: proc() {
cast(^ast.Comp_Lit)field_value.value,
)
}
+
+
+return_with_multiple_identifiers :: proc() {
+ return aaaaaaaaaaaaaaaaaa,
+ bbbbbbbbbbbbbbbbbbbb,
+ cccccccccccccccccccc,
+ dddddddddddddddddddddddddd
+}
+
+
+return_with_call_expression_in_the_end :: proc() {
+ return newlines_before_comment, cons_with_nopl(
+ document,
+ cons(text(p.indentation), line_suffix(comment.text)),
+ )
+}
diff --git a/tools/odinfmt/tests/returns.odin b/tools/odinfmt/tests/returns.odin
index 2359308..fea7c2d 100644
--- a/tools/odinfmt/tests/returns.odin
+++ b/tools/odinfmt/tests/returns.odin
@@ -22,4 +22,17 @@ returns_with_call_expression :: proc() {
symbol,
cast(^ast.Comp_Lit)field_value.value,
)
-} \ No newline at end of file
+}
+
+
+return_with_multiple_identifiers :: proc() {
+ return aaaaaaaaaaaaaaaaaa, bbbbbbbbbbbbbbbbbbbb, cccccccccccccccccccc, dddddddddddddddddddddddddd
+}
+
+
+return_with_call_expression_in_the_end :: proc() {
+ return newlines_before_comment, cons_with_nopl(document, cons(text(p.indentation), line_suffix(comment.text)))
+}
+
+
+