diff options
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_arglist.vim | 18 | ||||
-rw-r--r-- | src/nvim/testdir/test_command_count.vim | 2 | ||||
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 19 | ||||
-rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 10 | ||||
-rw-r--r-- | src/nvim/testdir/test_registers.vim | 3 |
5 files changed, 12 insertions, 40 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index 08e578a226..a1ef8325ec 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -26,8 +26,6 @@ func Test_argidx() endfunc func Test_argadd() - call Reset_arglist() - %argdelete argadd a b c call assert_equal(0, argidx()) @@ -105,11 +103,6 @@ func Init_abc() next endfunc -func Reset_arglist() - cd - args a | %argd -endfunc - func Assert_argc(l) call assert_equal(len(a:l), argc()) let i = 0 @@ -122,7 +115,8 @@ endfunc " Test for [count]argument and [count]argdelete commands " Ported from the test_argument_count.in test script func Test_argument() - call Reset_arglist() + " Clean the argument list + arga a | %argd let save_hidden = &hidden set hidden @@ -250,7 +244,8 @@ endfunc " Test for 0argadd and 0argedit " Ported from the test_argument_0count.in test script func Test_zero_argadd() - call Reset_arglist() + " Clean the argument list + arga a | %argd arga a b c d 2argu @@ -277,6 +272,10 @@ func Test_zero_argadd() call assert_equal('file with spaces', expand('%')) endfunc +func Reset_arglist() + args a | %argd +endfunc + " Test for argc() func Test_argc() call Reset_arglist() @@ -409,7 +408,6 @@ endfunc " Test for the :argdelete command func Test_argdelete() call Reset_arglist() - args aa a aaa b bb argdelete a* call assert_equal(['b', 'bb'], argv()) diff --git a/src/nvim/testdir/test_command_count.vim b/src/nvim/testdir/test_command_count.vim index 36ff4cd1bb..55b230373f 100644 --- a/src/nvim/testdir/test_command_count.vim +++ b/src/nvim/testdir/test_command_count.vim @@ -103,8 +103,6 @@ endfunc func Test_command_count_2() silent! %argd - cd - arga a b c d call assert_fails('5argu', 'E16:') diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index c280aedffb..93f567b3a0 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -1402,10 +1402,6 @@ func Test_bufadd_bufload() endfunc func Test_readdir() - if isdirectory('Xdir') - call delete('Xdir', 'rf') - endif - call mkdir('Xdir') call writefile([], 'Xdir/foo.txt') call writefile([], 'Xdir/bar.txt') @@ -1460,19 +1456,4 @@ func Test_default_arg_value() call assert_equal('msg', HasDefault()) endfunc -func Test_delete_rf() - call mkdir('Xdir') - call writefile([], 'Xdir/foo.txt') - call writefile([], 'Xdir/bar.txt') - call mkdir('Xdir/[a-1]') " issue #696 - call writefile([], 'Xdir/[a-1]/foo.txt') - call writefile([], 'Xdir/[a-1]/bar.txt') - call assert_true(filereadable('Xdir/foo.txt')) - call assert_true(filereadable('Xdir/[a-1]/foo.txt')) - - call assert_equal(0, delete('Xdir', 'rf')) - call assert_false(filereadable('Xdir/foo.txt')) - call assert_false(filereadable('Xdir/[a-1]/foo.txt')) -endfunc - " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 16b6a5f464..da949f5940 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -1011,9 +1011,10 @@ endfunc " Tests for %D and %X errorformat options func Test_efm_dirstack() " Create the directory stack and files - call mkdir('dir1/a', 'p') - call mkdir('dir1/a/b', 'p') - call mkdir('dir1/c', 'p') + call mkdir('dir1') + call mkdir('dir1/a') + call mkdir('dir1/a/b') + call mkdir('dir1/c') call mkdir('dir2') let lines =<< trim [DATA] @@ -3484,9 +3485,6 @@ func Xqftick_tests(cchar) \ {'filename' : 'F7', 'lnum' : 11, 'text' : 'L11'}], 'r') call assert_equal(2, g:Xgetlist({'changedtick' : 0}).changedtick) - if isdirectory("Xone") - call delete("Xone", 'rf') - endif call writefile(["F8:80:L80", "F8:81:L81"], "Xone") Xfile Xone call assert_equal(1, g:Xgetlist({'changedtick' : 0}).changedtick) diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index bcadb84ced..53069b3d31 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -43,9 +43,6 @@ func Test_yank_shows_register() endfunc func Test_display_registers() - " Disable clipboard - let g:clipboard = {} - e file1 e file2 call setline(1, ['foo', 'bar']) |