(t *testing.T)
| 425 | } |
| 426 | |
| 427 | func TestInsertTextWithOneNewline(t *testing.T) { |
| 428 | check( |
| 429 | t, |
| 430 | []string{ |
| 431 | "My First Line", |
| 432 | "\t\tMy Second Line", |
| 433 | " Third Line", |
| 434 | "", |
| 435 | "1", |
| 436 | }, |
| 437 | []operation{ |
| 438 | { |
| 439 | start: Loc{2, 0}, |
| 440 | end: Loc{2, 0}, |
| 441 | text: []string{ |
| 442 | " new line", |
| 443 | "No longer", |
| 444 | }, |
| 445 | }, |
| 446 | }, |
| 447 | []string{ |
| 448 | "My new line", |
| 449 | "No longer First Line", |
| 450 | "\t\tMy Second Line", |
| 451 | " Third Line", |
| 452 | "", |
| 453 | "1", |
| 454 | }, |
| 455 | ) |
| 456 | } |
| 457 | |
| 458 | func TestInsertTextWithTwoNewlines(t *testing.T) { |
| 459 | check( |