From 2813c83ea10b157974bdff7ceec9c3fc7f0d3380 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 22 Jun 2019 15:19:01 -0400 Subject: vim-patch:8.1.1519: 'backupskip' may contain duplicates Problem: 'backupskip' may contain duplicates. Solution: Add the P_NODUP flag. (Tom Ryder) https://github.com/vim/vim/commit/06e2c81f6d213d197aa60019b33a263cd5176d68 --- src/nvim/testdir/test_options.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index ecfc84432a..28576709a3 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -391,6 +391,15 @@ func Test_backupskip() call assert_true(found, var . ' (' . varvalue . ') not in option bsk: ' . &bsk) endif endfor + + " Duplicates should be filtered out (option has P_NODUP) + let backupskip = &backupskip + set backupskip= + set backupskip+=/test/dir + set backupskip+=/other/dir + set backupskip+=/test/dir + call assert_equal('/test/dir,/other/dir', &backupskip) + let &backupskip = backupskip endfunc func Test_copy_winopt() -- cgit