view src/testdir/test_set.vim @ 22218:195a617b405a v8.2.1658

patch 8.2.1658: expand('<stack>') has trailing ".." Commit: https://github.com/vim/vim/commit/a810db3f17d477e057059c72062c08fd97bcea43 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 11 17:59:23 2020 +0200 patch 8.2.1658: expand('<stack>') has trailing ".." Problem: Expand('<stack>') has trailing "..". Solution: Remove the "..". (closes https://github.com/vim/vim/issues/6927)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Sep 2020 18:00:03 +0200
parents 08940efa6b4e
children dd98794f7d8c
line wrap: on
line source

" Tests for the :set command

function Test_set_backslash()
  let isk_save = &isk

  set isk=a,b,c
  set isk+=d
  call assert_equal('a,b,c,d', &isk)
  set isk+=\\,e
  call assert_equal('a,b,c,d,\,e', &isk)
  set isk-=e
  call assert_equal('a,b,c,d,\', &isk)
  set isk-=\\
  call assert_equal('a,b,c,d', &isk)

  let &isk = isk_save
endfunction

function Test_set_add()
  let wig_save = &wig

  set wildignore=*.png,
  set wildignore+=*.jpg
  call assert_equal('*.png,*.jpg', &wig)

  let &wig = wig_save
endfunction

" vim: shiftwidth=2 sts=2 expandtab