|
1 | 1 | " Test spell checking
|
2 | 2 | " Note: this file uses latin1 encoding, but is used with utf-8 encoding.
|
3 | 3 |
|
| 4 | +source check.vim |
4 | 5 | if !has('spell')
|
5 | 6 | finish
|
6 | 7 | endif
|
7 | 8 |
|
| 9 | +source screendump.vim |
| 10 | + |
8 | 11 | func TearDown()
|
9 | 12 | set nospell
|
10 | 13 | call delete('Xtest.aff')
|
@@ -477,6 +480,44 @@ func RunGoodBad(good, bad, expected_words, expected_bad_words)
|
477 | 480 | bwipe!
|
478 | 481 | endfunc
|
479 | 482 |
|
| 483 | +func Test_spell_screendump() |
| 484 | + CheckScreendump |
| 485 | + |
| 486 | + let lines =<< trim END |
| 487 | + call setline(1, [ |
| 488 | + \ "This is some text without any spell errors. Everything", |
| 489 | + \ "should just be black, nothing wrong here.", |
| 490 | + \ "", |
| 491 | + \ "This line has a sepll error. and missing caps.", |
| 492 | + \ "And and this is the the duplication.", |
| 493 | + \ "with missing caps here.", |
| 494 | + \ ]) |
| 495 | + set spell spelllang=en_nz |
| 496 | + END |
| 497 | + call writefile(lines, 'XtestSpell') |
| 498 | + let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) |
| 499 | + call VerifyScreenDump(buf, 'Test_spell_1', {}) |
| 500 | + |
| 501 | + let lines =<< trim END |
| 502 | + call setline(1, [ |
| 503 | + \ "This is some text without any spell errors. Everything", |
| 504 | + \ "should just be black, nothing wrong here.", |
| 505 | + \ "", |
| 506 | + \ "This line has a sepll error. and missing caps.", |
| 507 | + \ "And and this is the the duplication.", |
| 508 | + \ "with missing caps here.", |
| 509 | + \ ]) |
| 510 | + set spell spelllang=en_nz |
| 511 | + END |
| 512 | + call writefile(lines, 'XtestSpell') |
| 513 | + let buf = RunVimInTerminal('-S XtestSpell', {'rows': 8}) |
| 514 | + call VerifyScreenDump(buf, 'Test_spell_1', {}) |
| 515 | + |
| 516 | + " clean up |
| 517 | + call StopVimInTerminal(buf) |
| 518 | + call delete('XtestSpell') |
| 519 | +endfunc |
| 520 | + |
480 | 521 | let g:test_data_aff1 = [
|
481 | 522 | \"SET ISO8859-1",
|
482 | 523 | \"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",
|
|
0 commit comments