summaryrefslogtreecommitdiff
path: root/internal/lsp/postprocess_indent_test.go
blob: b36d5aa9d2979e868f66eb235fc2d3d1694b7ef1 (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.completion.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)
	}
}