From a3ffb8e2ff07a8da804724fe78809312bb580dba Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 28 Aug 2024 22:43:06 -0400 Subject: [PATCH] Prep tests for when SkipIf get merged into vader.vim I've just made a test run of the PR on vader.vim that adds two new blocks that makes some tests skippable and it does work! The PR is incomplete though and it's hard to tell when/if it'll ever get merged. Nonetheless I'll keep the working test syntax if it can ever come in hand. The best thing though would be if were able to fix the plugin's filetype detection for vim, thus removing the need to skip tests. --- test/filetype/epuppet.vader | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/filetype/epuppet.vader b/test/filetype/epuppet.vader index 67c867a..8abb89f 100644 --- a/test/filetype/epuppet.vader +++ b/test/filetype/epuppet.vader @@ -6,7 +6,17 @@ Execute (epuppet test_with_leading_tag): edit test/test-files/test_with_leading_tag.epp AssertEqual &filetype, 'epuppet' -# TODO: this is passing for nvim but not vim +# If/when https://github.com/junegunn/vader.vim/pull/201 gets merged into +# vader.vim, we can use the following to skip the test on vim -- until we +# actually fix the filetype detection. +# Until SkipIf gets merged, though we need to keep the test commented out to +# avoid useless CI failure unrelated to other changes +#Given: +# +#SkipIf (ftdetect/puppet.vim is unable to match filetype with content header): +# if !has('nvim') +# VaderSkip +# endif #Execute (epuppet perl with shebang): # edit test/test-files/test_perl_with_shebang.epp # AssertEqual &filetype, 'epuppet' @@ -28,7 +38,13 @@ Execute (epuppet php with extension): AssertEqual &filetype, 'epuppet' AssertEqual b:epuppet_subtype, 'php' -# TODO: this is passing for nvim but not vim +# Same as above +#Given: +# +#SkipIf (ftdetect/puppet.vim is unable match filetype by path): +# if !has('nvim') +# VaderSkip +# endif #Execute (epuppet apache conf with path and extension): # edit test/test-files/etc/apache2/test.conf.epp # AssertEqual &filetype, 'epuppet'