1// Copyright 2019 The Go Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5package gopls_test 6 7import ( 8 "os" 9 "testing" 10 11 "golang.org/x/tools/gopls/internal/hooks" 12 cmdtest "golang.org/x/tools/internal/lsp/cmd/test" 13 "golang.org/x/tools/internal/lsp/source" 14 "golang.org/x/tools/internal/lsp/tests" 15 "golang.org/x/tools/internal/testenv" 16) 17 18func TestMain(m *testing.M) { 19 testenv.ExitIfSmallMachine() 20 os.Exit(m.Run()) 21} 22 23func TestCommandLine(t *testing.T) { 24 cmdtest.TestCommandLine(t, "../../internal/lsp/testdata", commandLineOptions) 25} 26 27func commandLineOptions(options *source.Options) { 28 options.Staticcheck = true 29 options.GoDiff = false 30 tests.DefaultOptions(options) 31 hooks.Options(options) 32} 33