diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 07:22:17 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-07-12 11:52:47 +0800 |
| commit | 53392f48b1e258bc11afdad7104930d7c1a361da (patch) | |
| tree | a5d15ea92d0197cd0f5c3b08d6c95071fc0913ba /src/nvim/testdir/test_excmd.vim | |
| parent | 189db2b759b48d7e10dc0d092ba62141e7eca39e (diff) | |
| download | rneovim-53392f48b1e258bc11afdad7104930d7c1a361da.tar.gz rneovim-53392f48b1e258bc11afdad7104930d7c1a361da.tar.bz2 rneovim-53392f48b1e258bc11afdad7104930d7c1a361da.zip | |
vim-patch:8.2.0203: :helptags and some other functionality not tested
Problem: :helptags and some other functionality not tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5567)
https://github.com/vim/vim/commit/e20b9ececa37a81c0340a78f61e57fa1bf46b06d
Diffstat (limited to 'src/nvim/testdir/test_excmd.vim')
| -rw-r--r-- | src/nvim/testdir/test_excmd.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_excmd.vim b/src/nvim/testdir/test_excmd.vim index 9b59792696..ff5c28d54a 100644 --- a/src/nvim/testdir/test_excmd.vim +++ b/src/nvim/testdir/test_excmd.vim @@ -223,12 +223,24 @@ func Test_change_cmd() close! endfunc +" Test for the :language command +func Test_language_cmd() + CheckNotMSWindows " FIXME: why does this fail on Windows CI? + CheckNotBSD " FIXME: why does this fail on OpenBSD CI? + CheckFeature multi_lang + + call assert_fails('language ctype non_existing_lang', 'E197:') + call assert_fails('language time non_existing_lang', 'E197:') +endfunc + " Test for the :confirm command dialog func Test_confirm_cmd() CheckNotGui CheckRunVimInTerminal + call writefile(['foo1'], 'foo') call writefile(['bar1'], 'bar') + " Test for saving all the modified buffers let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") @@ -241,8 +253,10 @@ func Test_confirm_cmd() call WaitForAssert({-> assert_match('\[Y\]es, (N)o, Save (A)ll, (D)iscard All, (C)ancel: ', term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "A") call StopVimInTerminal(buf) + call assert_equal(['foo2'], readfile('foo')) call assert_equal(['bar2'], readfile('bar')) + " Test for discarding all the changes to modified buffers let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") @@ -255,8 +269,10 @@ func Test_confirm_cmd() call WaitForAssert({-> assert_match('\[Y\]es, (N)o, Save (A)ll, (D)iscard All, (C)ancel: ', term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "D") call StopVimInTerminal(buf) + call assert_equal(['foo2'], readfile('foo')) call assert_equal(['bar2'], readfile('bar')) + " Test for saving and discarding changes to some buffers let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") @@ -271,6 +287,7 @@ func Test_confirm_cmd() call WaitForAssert({-> assert_match('\[Y\]es, (N)o, (C)ancel: ', term_getline(buf, 20))}, 1000) call term_sendkeys(buf, "Y") call StopVimInTerminal(buf) + call assert_equal(['foo4'], readfile('foo')) call assert_equal(['bar2'], readfile('bar')) |