diff options
| author | ckelsel <ckelsel@hotmail.com> | 2017-09-24 09:16:59 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-09-24 09:16:59 +0800 |
| commit | 90fc9039ddcadc61d4236bdd2d638d690081e04d (patch) | |
| tree | ecf08d95a7c9459fa5a79202d85e6666c3f5ee88 /src/nvim/testdir | |
| parent | 6258e33b114dc4386e608a5cf3a48742757441f7 (diff) | |
| parent | 4bb0e95abbf0a61d383d5261019a2667706c9d39 (diff) | |
| download | rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.tar.gz rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.tar.bz2 rneovim-90fc9039ddcadc61d4236bdd2d638d690081e04d.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/Makefile | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 14 | ||||
| -rw-r--r-- | src/nvim/testdir/test_mksession.vim | 15 | ||||
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 6 |
4 files changed, 35 insertions, 1 deletions
diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 96de7224c5..9133bfc0a2 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -58,6 +58,7 @@ NEW_TESTS ?= \ test_match.res \ test_matchadd_conceal.res \ test_matchadd_conceal_utf8.res \ + test_mksession.res \ test_nested_function.res \ test_normal.res \ test_quickfix.res \ diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 2facffb067..c0f04f4730 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -250,9 +250,21 @@ func Test_remove_char_in_cmdline() call assert_equal('"def', @:) endfunc -func Test_illegal_address() +func Test_illegal_address1() new 2;'( 2;') quit endfunc + +func Test_illegal_address2() + call writefile(['c', 'x', ' x', '.', '1;y'], 'Xtest.vim') + new + source Xtest.vim + " Trigger calling validate_cursor() + diffsp Xtest.vim + quit! + bwipe! + call delete('Xtest.vim') +endfunc + diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim new file mode 100644 index 0000000000..2238213850 --- /dev/null +++ b/src/nvim/testdir/test_mksession.vim @@ -0,0 +1,15 @@ +" Tests for sessions + +" Verify that arglist is stored correctly to the session file. +func Test_mksession_arglist() + argdel * + next file1 file2 file3 file4 + mksession! Xtest_mks.out + source Xtest_mks.out + call assert_equal(['file1', 'file2', 'file3', 'file4'], argv()) + + call delete('Xtest_mks.out') + argdel * +endfunc + +" vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 5ee0919e18..2ffe63787b 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -13,6 +13,12 @@ function! Test_whichwrap() set whichwrap+=h,l call assert_equal('b,s,h,l', &whichwrap) + set whichwrap=h,h + call assert_equal('h', &whichwrap) + + set whichwrap=h,h,h + call assert_equal('h', &whichwrap) + set whichwrap& endfunction |