37 lines
883 B
Go
37 lines
883 B
Go
// Code generated by convertFourslash; DO NOT EDIT.
|
|
// To modify this test, run "npm run makemanual formatSelectionPreserveTrailingWhitespace"
|
|
|
|
package fourslash_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/microsoft/typescript-go/internal/core"
|
|
"github.com/microsoft/typescript-go/internal/fourslash"
|
|
"github.com/microsoft/typescript-go/internal/testutil"
|
|
)
|
|
|
|
func TestFormatSelectionPreserveTrailingWhitespace(t *testing.T) {
|
|
fourslash.SkipIfFailing(t)
|
|
t.Parallel()
|
|
defer testutil.RecoverAndFail(t, "Panic on fourslash test")
|
|
const content = `
|
|
/*begin*/;
|
|
|
|
/*end*/
|
|
|
|
`
|
|
f, done := fourslash.NewFourslash(t, nil /*capabilities*/, content)
|
|
defer done()
|
|
opts154 := f.GetOptions()
|
|
opts154.FormatCodeSettings.TrimTrailingWhitespace = core.TSFalse
|
|
f.Configure(t, opts154)
|
|
f.FormatSelection(t, "begin", "end")
|
|
f.VerifyCurrentFileContent(t, `
|
|
;
|
|
|
|
|
|
|
|
`)
|
|
}
|