[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
+}
- [nongnu] elpa/go-mode 2835258 007/495: support `import foo "bar"` syntax in go-goto-imports, (continued)
- [nongnu] elpa/go-mode 2835258 007/495: support `import foo "bar"` syntax in go-goto-imports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 0a570b1 014/495: use `go env` to determine goroot and gopath, support multiple gopath entries and skip over ones with no pkg dir, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6ccd9b9 017/495: Revert "if line has been indented with spaces, replace them with tabs", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 492e065 018/495: note in readme that old go-mode will interfere with this one, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 26759b9 027/495: support unused import detection for *_test.go files, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7fb4e67 023/495: Support methods in beginning-of-defun and end-of-defun, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6da1af6 031/495: use goto-char instead of beginning-of-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 52914d5 039/495: Correctly indent next line if raw string is following an operator, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ca3050a 045/495: temporarily disable flymake-mode in go-remove-unused-imports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 445d10d 032/495: do not use goto-line but forward-line instead, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7751f22 040/495: add test cases for indentation,
ELPA Syncer <=
- [nongnu] elpa/go-mode 27f6fb0 047/495: improve indentation routine by jumping around less, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 73137ff 002/495: remove autoload cookies, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1357916 005/495: go-beginning-of-defun does not need to be interactive, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 55def23 008/495: more descriptive messages in go-goto-imports, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode ccd95ee 016/495: rename some internal functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5c8a47c 030/495: use (forward-line -1) instead of (previous-line), ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4c5493b 036/495: also load diff-mode during compilation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode faafd90 038/495: add autoload cookies, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c97dacc 044/495: do not change the indentation of multiline comments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5fbf6bd 048/495: remove unnecessary progns, ELPA Syncer, 2021/08/07