package main import ( "context" "os" "testing" "github.com/stretchr/testify/assert" ) func TestCompile(t *testing.T) { t.Parallel() t.Run("With testdata", func(t *testing.T) { ctx := context.Background() err := format(ctx, withPath("testdata/test_module")) assert.NoError(t, err) file, err := os.ReadFile("testdata/test_module/very_long_line.go") assert.NoError(t, err) assert.Equal(t, string(file), `package testmodule func SomeFunction( with, lots, of, parameters, more, more, more, more, more string, ) (and string, lots string, of string, someerror string, returns string) { return "", "", "", "", "" } `) }) }