Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / mvdan.cc / gofumpt@v0.0.0-20200802201014-ab5a8192947d / testdata / scripts / short-case.txt
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d/testdata/scripts/short-case.txt b/.config/coc/extensions/coc-go-data/tools/pkg/mod/mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d/testdata/scripts/short-case.txt
new file mode 100644 (file)
index 0000000..7a828c1
--- /dev/null
@@ -0,0 +1,93 @@
+gofumpt -w foo.go
+cmp foo.go foo.go.golden
+
+gofumpt -d foo.go.golden
+! stdout .
+
+-- foo.go --
+package p
+
+func f(r rune) {
+       switch r {
+       case 'a',
+               'b',
+               'c':
+
+       case 'd', 'e', 'f':
+
+       case 'a', 'b',
+               'c':
+
+       case 'v', 'e', 'r', 'y', 'l', 'o', 'n', 'g',
+               'l', 'i', 's', 't', '.', '.', '.':
+
+       // before
+       case 'a',
+               'b': // inline
+               // after
+
+       case 'a', // middle
+               'b':
+
+       case 'a', 'b', 'c', 'd', 'e', 'f',
+               'g': // very very long inline comment at the end
+
+       case 'a', 'b', 'c',
+               'd': // short comment
+       }
+       {
+               {
+                       {
+                               {
+                                       {
+                                               switch r {
+                                               case 'i', 'n', 'd', 'e',
+                                                       'n', 't', 'e', 'd':
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}
+-- foo.go.golden --
+package p
+
+func f(r rune) {
+       switch r {
+       case 'a', 'b', 'c':
+
+       case 'd', 'e', 'f':
+
+       case 'a', 'b', 'c':
+
+       case 'v', 'e', 'r', 'y', 'l', 'o', 'n', 'g',
+               'l', 'i', 's', 't', '.', '.', '.':
+
+       // before
+       case 'a', 'b': // inline
+               // after
+
+       case 'a', // middle
+               'b':
+
+       case 'a', 'b', 'c', 'd', 'e', 'f',
+               'g': // very very long inline comment at the end
+
+       case 'a', 'b', 'c', 'd': // short comment
+       }
+       {
+               {
+                       {
+                               {
+                                       {
+                                               switch r {
+                                               case 'i', 'n', 'd', 'e',
+                                                       'n', 't', 'e', 'd':
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}