emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 7751f22 040/495: add test cases for indentation


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 7751f22 040/495: add test cases for indentation
Date: Sat, 7 Aug 2021 09:04:39 -0400 (EDT)

branch: elpa/go-mode
commit 7751f2293fa5db5da027baf98068e6886b929dbd
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    add test cases for indentation
---
 indentation_tests/dangling_operator.go | 29 +++++++++++++++++++++++++++++
 indentation_tests/gh-11.go             |  7 +++++++
 indentation_tests/gh-13.go             |  9 +++++++++
 indentation_tests/gh-14.go             |  7 +++++++
 indentation_tests/gh-9.go              |  7 +++++++
 indentation_tests/multiline_string.go  |  9 +++++++++
 6 files changed, 68 insertions(+)

diff --git a/indentation_tests/dangling_operator.go 
b/indentation_tests/dangling_operator.go
new file mode 100644
index 0000000..9753358
--- /dev/null
+++ b/indentation_tests/dangling_operator.go
@@ -0,0 +1,29 @@
+package main
+
+func init() {
+       a :=
+               123
+
+       print(123,
+               456,
+               789,
+       )
+
+       c :=
+               "foo"
+
+       d := // meh
+               123
+
+       e := /* meh
+               another meh
+               */
+               123
+
+       println(123, /* foo
+               bar */
+               456,
+       )
+
+       return
+}
diff --git a/indentation_tests/gh-11.go b/indentation_tests/gh-11.go
new file mode 100644
index 0000000..9704e4f
--- /dev/null
+++ b/indentation_tests/gh-11.go
@@ -0,0 +1,7 @@
+package gh11
+
+func init() {
+       g(someSillyLongExpression(param1, param2, param3),
+               "boo")
+       x := 42
+}
diff --git a/indentation_tests/gh-13.go b/indentation_tests/gh-13.go
new file mode 100644
index 0000000..c9a8171
--- /dev/null
+++ b/indentation_tests/gh-13.go
@@ -0,0 +1,9 @@
+package gh13
+
+func init() {
+       f :=
+               print(1,
+                       2,
+                       3,
+               )
+}
diff --git a/indentation_tests/gh-14.go b/indentation_tests/gh-14.go
new file mode 100644
index 0000000..296b9d5
--- /dev/null
+++ b/indentation_tests/gh-14.go
@@ -0,0 +1,7 @@
+package gh14
+
+func bar() string {
+       s := `foo
+bar`
+       return s
+}
diff --git a/indentation_tests/gh-9.go b/indentation_tests/gh-9.go
new file mode 100644
index 0000000..2642919
--- /dev/null
+++ b/indentation_tests/gh-9.go
@@ -0,0 +1,7 @@
+package gh9
+
+func x() string {
+       s := f(`
+foo`)
+       return s
+}
diff --git a/indentation_tests/multiline_string.go 
b/indentation_tests/multiline_string.go
new file mode 100644
index 0000000..e10eed7
--- /dev/null
+++ b/indentation_tests/multiline_string.go
@@ -0,0 +1,9 @@
+package multilinestring
+
+func foo() string {
+       s := `foo
+bar
+baz`
+
+       return s
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]