aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_options.vim
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2023-12-07 01:34:29 +0600
committerFamiu Haque <famiuhaque@proton.me>2023-12-14 16:46:42 +0600
commit3c2c022e5e299ecac4663c3813e2db5e2b099ffa (patch)
tree8cfefb87b8a675e1c29b0caf3e1adca14bf196b5 /test/old/testdir/test_options.vim
parent320e9c1c21817fd76b84345018661f70437fa4b5 (diff)
downloadrneovim-3c2c022e5e299ecac4663c3813e2db5e2b099ffa.tar.gz
rneovim-3c2c022e5e299ecac4663c3813e2db5e2b099ffa.tar.bz2
rneovim-3c2c022e5e299ecac4663c3813e2db5e2b099ffa.zip
refactor(options): remove option type macros
Problem: We have `P_(BOOL|NUM|STRING)` macros to represent an option's type, which is redundant because `OptValType` can already do that. The current implementation of option type flags is also too limited to allow adding multitype options in the future. Solution: Remove `P_(BOOL|NUM|STRING)` and replace it with a new `type_flags` attribute in `vimoption_T`. Also do some groundwork for adding multitype options in the future. Side-effects: Attempting to set an invalid keycode option (e.g. `set t_foo=123`) no longer gives an error.
Diffstat (limited to 'test/old/testdir/test_options.vim')
-rw-r--r--test/old/testdir/test_options.vim8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index 2bba86fe99..2aa7d3ab65 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -813,7 +813,7 @@ func Test_set_option_errors()
call assert_fails('set winwidth=9 winminwidth=10', 'E592:')
set winwidth& winminwidth&
call assert_fails("set showbreak=\x01", 'E595:')
- call assert_fails('set t_foo=', 'E846:')
+ " call assert_fails('set t_foo=', 'E846:')
call assert_fails('set tabstop??', 'E488:')
call assert_fails('set wrapscan!!', 'E488:')
call assert_fails('set tabstop&&', 'E488:')
@@ -1446,8 +1446,10 @@ endfunc
" Test for setting keycodes using set
func Test_opt_set_keycode()
- call assert_fails('set <t_k1=l', 'E474:')
- call assert_fails('set <Home=l', 'E474:')
+ " call assert_fails('set <t_k1=l', 'E474:')
+ " call assert_fails('set <Home=l', 'E474:')
+ call assert_fails('set <t_k1=l', 'E518:')
+ call assert_fails('set <Home=l', 'E518:')
set <t_k9>=abcd
" call assert_equal('abcd', &t_k9)
set <t_k9>&