aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_history.vim5
-rw-r--r--test/old/testdir/test_options.vim16
2 files changed, 14 insertions, 7 deletions
diff --git a/test/old/testdir/test_history.vim b/test/old/testdir/test_history.vim
index f1c31dee04..bb6d671725 100644
--- a/test/old/testdir/test_history.vim
+++ b/test/old/testdir/test_history.vim
@@ -244,8 +244,13 @@ endfunc
" Test for making sure the key value is not stored in history
func Test_history_crypt_key()
CheckFeature cryptv
+
call feedkeys(":set bs=2 key=abc ts=8\<CR>", 'xt')
call assert_equal('set bs=2 key= ts=8', histget(':'))
+
+ call assert_fails("call feedkeys(':set bs=2 key-=abc ts=8\<CR>', 'xt')")
+ call assert_equal('set bs=2 key-= ts=8', histget(':'))
+
set key& bs& ts&
endfunc
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index 9068546c3e..d524ea85a8 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -369,13 +369,15 @@ func Test_set_completion()
call feedkeys(":set spellsuggest=best,file:test_options.v\<Tab>\<C-B>\"\<CR>", 'xt')
call assert_equal("\"set spellsuggest=best,file:test_options.vim", @:)
- " Expand value for 'key'
- " set key=abcd
- " call feedkeys(":set key=\<Tab>\<C-B>\"\<CR>", 'xt')
- " call assert_equal('"set key=*****', @:)
- " call feedkeys(":set key-=\<Tab>\<C-B>\"\<CR>", 'xt')
- " call assert_equal('"set key-=*****', @:)
- " set key=
+ " Expanding value for 'key' is disallowed
+ if exists('+key')
+ set key=abcd
+ call feedkeys(":set key=\<Tab>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"set key=', @:)
+ call feedkeys(":set key-=\<Tab>\<C-B>\"\<CR>", 'xt')
+ call assert_equal('"set key-=', @:)
+ set key=
+ endif
" Expand values for 'filetype'
call feedkeys(":set filetype=sshdconfi\<Tab>\<C-B>\"\<CR>", 'xt')