Skip to content

Commit 789d22c

Browse files
committed
Add CI / test checks to make sure we don't accidentally lose features
Add CI test to confirm desired Vim features like +sound / etc exist. Smoketest also checks for libsodium now by trying to set xchacha20 cryptmethod which can only succeed if sodium is enabled. Also make sure it's actually checking the scripting language bindings are working properly. Previously for some reason it wasn't checking the print results.
1 parent e456219 commit 789d22c

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/ci-macvim.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,18 @@ jobs:
251251
}
252252
253253
# Smoketest scripting languages
254-
macvim_excmd -c 'lua print("Test")'
255-
macvim_excmd -c 'perl VIM::Msg("Test")'
256-
macvim_excmd -c 'py print "Test"'
257-
macvim_excmd -c 'py3 print("Test")'
258-
macvim_excmd -c 'ruby puts("Test")'
254+
macvim_excmd -c 'lua print("Test")' | grep Test
255+
macvim_excmd -c 'perl VIM::Msg("Test")' | grep Test
256+
macvim_excmd -c 'py print "Test"' | grep Test
257+
macvim_excmd -c 'py3 print("Test")' | grep Test
258+
macvim_excmd -c 'ruby puts("Test")' | grep Test
259259
260260
# Check that localized messages work by printing ':version' and checking against localized word
261261
macvim_excmd -c 'lang es_ES' -c 'version' | grep Enlazado
262262
263+
# Check that libsodium is working
264+
macvim_excmd -c 'set cryptmethod=xchacha20'
265+
263266
# Make sure there isn't any dynamic linkage to third-party dependencies in the built binary, as we should only use
264267
# static linkage to avoid dependency hell. Test that all those dylib's are in /usr/lib which is bundled with macOS and not third-party.
265268
if otool -L ${VIM_BIN} | grep '\.dylib\s' | grep -v '^\s*/usr/lib/'; then

src/testdir/test_macvim.vim

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,21 @@ func Test_macvim_options_commands()
1919
call assert_true(exists(':macaction'), 'Missing command "macaction"')
2020
call assert_true(exists(':macmenu'), 'Missing command "macmenu"')
2121

22+
call assert_true(exists('*showdefinition'), 'Missing function "showdefinition"')
23+
2224
call assert_true(exists('##OSAppearanceChanged'), 'Missing autocmd event "OSAppearanceChanged"')
2325

2426
call assert_true(has('fullscreen'), 'Missing feature "fullscreen"')
2527
call assert_true(has('gui_macvim'), 'Missing feature "gui_macvim"')
2628
call assert_true(has('odbeditor'), 'Missing feature "odbeditor"')
2729
call assert_true(has('touchbar'), 'Missing feature "touchbar"')
2830
call assert_true(has('transparency'), 'Missing feature "transparency"')
31+
32+
" Vim system-specific features that we expect to be on in macOS
33+
call assert_true(has('clipboard'), 'Missing feature "clipboard"')
34+
call assert_true(has('sound'), 'Missing feature "sound"')
35+
call assert_true(has('terminal'), 'Missing feature "terminal"')
36+
call assert_true(has('xim'), 'Missing feature "xim"')
2937
endfunc
3038

3139
" Test that Cmd-key and touch pad mappings are working (this doesn't actually

0 commit comments

Comments
 (0)