summaryrefslogtreecommitdiff
path: root/internal/lsp/postprocess_indent_test.go
blob: 28f73a5094ea4d1bba7b802255a3ae6f798aa4df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package lsp

import "testing"

func TestPostProcessCompletion_IndentWithDoubleOpen(t *testing.T) {
	s := newTestServer()
	cleaned := s.postProcessCompletion("a\nb", "", "  >>gen>")
	// Expect each non-empty line to be indented by two spaces
	want := "  a\n  b"
	if cleaned != want {
		t.Fatalf("got %q want %q", cleaned, want)
	}
}