Skip to content

Commit db2afe5

Browse files
committed
Fix upstream merge CI failure with 'winaltkeys'
Make sure to block testing 'winaltkeys' only if the option is supported. Also, while we are at it, add a test to make sure MacVim-specific options have proper error checking to prevent bad merge conflict resolution from accidentally removing said logic.
1 parent cbb385a commit db2afe5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/testdir/test_macvim.vim

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CheckFeature gui_macvim
55

66
" Tests for basic existence of commands and options to make sure no
77
" regressions have accidentally removed them
8-
func Test_macvim_options_commands()
8+
func Test_macvim_options_commands_exist()
99
call assert_true(exists('+antialias'), 'Missing option "antialias"')
1010
call assert_true(exists('+blurradius'), 'Missing option "blurradius"')
1111
call assert_true(exists('+fullscreen'), 'Missing option "fullscreen"')
@@ -62,3 +62,12 @@ func Test_macvim_mappings()
6262
call feedkeys("\<ForceClick>", "xt")
6363
call assert_equal(5, g:marker_value)
6464
endfunc
65+
66+
" Test that setting invalid values with properly throw invalid argument errors
67+
func Test_macvim_invalid_options()
68+
call assert_fails("let &blur=-1", 'E474:')
69+
call assert_fails("let &transparency=-1", 'E474:')
70+
call assert_fails("let &transparency=101", 'E474:')
71+
72+
call assert_fails("let &fuoptions='abcdef'", 'E474:')
73+
endfunc

src/testdir/test_options.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ func Test_string_option_revert_on_failure()
16561656
call add(optlist, ['varsofttabstop', '12', 'a123'])
16571657
call add(optlist, ['vartabstop', '4,20', '4,'])
16581658
endif
1659-
if has('gui')
1659+
if has('gui') && has('+winaltkeys')
16601660
call add(optlist, ['winaltkeys', 'no', 'a123'])
16611661
endif
16621662
for opt in optlist

0 commit comments

Comments
 (0)