+ + ); + """) + controller.textView.selectionManager.setSelectedRange(NSRange(location: 84, length: 0)) + controller.textView.insertText(" ") + // swifltint:disable:next trailing_whitespace + XCTAssertEqual( + controller.textView.string, + """ + const name = "CodeEdit" + const element = ( +
+ + ); + """ + ) + // swiflint:enable trailing_whitespace + } + + func test_TSXTagClose() { + controller.language = .tsx + controller.indentOption = .spaces(count: 4) + controller.setText(""" + const name = "CodeEdit" + const element = ( +
+ + ); + """) + controller.textView.selectionManager.setSelectedRange(NSRange(location: 84, length: 0)) + controller.textView.insertText(" ") + // swifltint:disable:next trailing_whitespace + XCTAssertEqual( + controller.textView.string, + """ + const name = "CodeEdit" + const element = ( +
+ + ); + """ + ) + // swiflint:enable trailing_whitespace + } +}