annotate src/testdir/test_spell.vim @ 11434:b3815e491811 v8.0.0601

patch 8.0.0601: no test coverage for :spellrepall commit https://github.com/vim/vim/commit/545cb79da586be3333a0a55616046f94b01f6b1a Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 23 11:31:22 2017 +0200 patch 8.0.0601: no test coverage for :spellrepall Problem: No test coverage for :spellrepall. Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/1717)
author Christian Brabandt <cb@256bit.org>
date Tue, 23 May 2017 11:45:03 +0200
parents a2124e9bbb6a
children 7798e9bcdb13
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10950
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test spell checking
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " TODO: move test58 tests here
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 if !has('spell')
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 finish
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 endif
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 func Test_wrap_search()
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 new
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 call setline(1, ['The', '', 'A plong line with two zpelling mistakes', '', 'End'])
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 set spell wrapscan
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 normal ]s
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 call assert_equal('plong', expand('<cword>'))
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 normal ]s
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 call assert_equal('zpelling', expand('<cword>'))
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 normal ]s
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call assert_equal('plong', expand('<cword>'))
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 bwipe!
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 set nospell
2297aae8e127 patch 8.0.0364: ]s does not move cursor with two spell errors in one line
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 endfunc
11394
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
21
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
22 func Test_z_equal_on_invalid_utf8_word()
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
23 split
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
24 set spell
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
25 call setline(1, "\xff")
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
26 norm z=
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
27 set nospell
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
28 bwipe!
a2124e9bbb6a patch 8.0.0582: illegal memory access with z= command
Christian Brabandt <cb@256bit.org>
parents: 10950
diff changeset
29 endfunc
11434
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
30
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
31 func Test_spellreall()
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
32 new
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
33 set spell
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
34 call assert_fails('spellrepall', 'E752:')
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
35 call setline(1, ['A speling mistake. The same speling mistake.',
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
36 \ 'Another speling mistake.'])
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
37 call feedkeys(']s1z=', 'tx')
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
38 call assert_equal('A spelling mistake. The same speling mistake.', getline(1))
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
39 call assert_equal('Another speling mistake.', getline(2))
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
40 spellrepall
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
41 call assert_equal('A spelling mistake. The same spelling mistake.', getline(1))
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
42 call assert_equal('Another spelling mistake.', getline(2))
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
43 call assert_fails('spellrepall', 'E753:')
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
44 set spell&
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
45 bwipe!
b3815e491811 patch 8.0.0601: no test coverage for :spellrepall
Christian Brabandt <cb@256bit.org>
parents: 11394
diff changeset
46 endfunc