diff options
author | sus-domesticus <134197728+sus-domesticus@users.noreply.github.com> | 2024-06-06 17:16:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 09:16:43 -0500 |
commit | cb6c0fda718e4503fc1bfc49a9fe92411f5f9005 (patch) | |
tree | 8213be77050e788060517c2830ab772356618492 /test/functional | |
parent | 972374f4e91dfbfa4a42202abc6e070dad6cdf02 (diff) | |
download | rneovim-cb6c0fda718e4503fc1bfc49a9fe92411f5f9005.tar.gz rneovim-cb6c0fda718e4503fc1bfc49a9fe92411f5f9005.tar.bz2 rneovim-cb6c0fda718e4503fc1bfc49a9fe92411f5f9005.zip |
feat(editorconfig): add support for spelling_language (#28638)
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/plugin/editorconfig_spec.lua | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/functional/plugin/editorconfig_spec.lua b/test/functional/plugin/editorconfig_spec.lua index 839a723405..242ed9b57f 100644 --- a/test/functional/plugin/editorconfig_spec.lua +++ b/test/functional/plugin/editorconfig_spec.lua @@ -16,8 +16,16 @@ local testdir = 'Xtest-editorconfig' local function test_case(name, expected) local filename = testdir .. pathsep .. name command('edit ' .. filename) + for opt, val in pairs(expected) do - eq(val, api.nvim_get_option_value(opt, { buf = 0 }), name) + local opt_info = api.nvim_get_option_info2(opt, {}) + if opt_info.scope == 'win' then + eq(val, api.nvim_get_option_value(opt, { win = 0 }), name) + elseif opt_info.scope == 'buf' then + eq(val, api.nvim_get_option_value(opt, { buf = 0 }), name) + else + eq(val, api.nvim_get_option_value(opt, {}), name) + end end end @@ -93,6 +101,12 @@ setup(function() [max_line_length.txt] max_line_length = 42 + + [short_spelling_language.txt] + spelling_language = de + + [long_spelling_language.txt] + spelling_language = en-NZ ]] ) end) @@ -222,4 +236,9 @@ But not this one eq(true, ok, err) end) + + it('sets spelllang', function() + test_case('short_spelling_language.txt', { spelllang = 'de' }) + test_case('long_spelling_language.txt', { spelllang = 'en_nz' }) + end) end) |