From 8c7ad3631af570f68b2da2658cf966a9a19cb6c4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 27 Sep 2020 13:58:38 +0200 Subject: patch 8.2.1754: completion with spell checking not tested MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Completion with spell checking not tested. Solution: Add a test case. (Dominique Pellé, closes #7024) --- src/testdir/test_spell.vim | 37 +++++++++++++++++++++++++++++++++++++ src/version.c | 2 ++ 2 files changed, 39 insertions(+) (limited to 'src') diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim index 4beff9a1a1..db40cd24a6 100644 --- a/src/testdir/test_spell.vim +++ b/src/testdir/test_spell.vim @@ -120,6 +120,43 @@ foobar/? set spell& endfunc +func Test_spelllang_inv_region() + set spell spelllang=en_xx + let messages = GetMessages() + call assert_equal('Warning: region xx not supported', messages[-1]) + set spell& spelllang& +endfunc + +func Test_compl_with_CTRL_X_CTRL_K_using_spell() + " When spell checking is enabled and 'dictionary' is empty, + " CTRL-X CTRL-K in insert mode completes using the spelling dictionary. + new + set spell spelllang=en dictionary= + + set ignorecase + call feedkeys("Senglis\\\", 'tnx') + call assert_equal(['English'], getline(1, '$')) + call feedkeys("SEnglis\\\", 'tnx') + call assert_equal(['English'], getline(1, '$')) + + set noignorecase + call feedkeys("Senglis\\\", 'tnx') + call assert_equal(['englis'], getline(1, '$')) + call feedkeys("SEnglis\\\", 'tnx') + call assert_equal(['English'], getline(1, '$')) + + set spelllang=en_us + call feedkeys("Stheat\\\", 'tnx') + call assert_equal(['theater'], getline(1, '$')) + set spelllang=en_gb + call feedkeys("Stheat\\\", 'tnx') + " FIXME: commented out, expected theatre bug got theater. See issue #7025. + " call assert_equal(['theatre'], getline(1, '$')) + + bwipe! + set spell& spelllang& dictionary& ignorecase& +endfunc + func Test_spellreall() new set spell diff --git a/src/version.c b/src/version.c index f3dbf2808a..1ee6801c9e 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1754, /**/ 1753, /**/ -- cgit v1.2.3