neovim: update tests to work with latest nixpkgs
Since https://github.com/NixOS/nixpkgs/pull/495392, the wrapper doesn't create provider executables along with the neovim wrapper. They still exist but at locations indicated by the g:XXX_provider_host variable.
This commit is contained in:
parent
7cd3093fc6
commit
4aeef1941f
1 changed files with 14 additions and 7 deletions
|
|
@ -55,9 +55,20 @@ in
|
|||
assertNeovimExpr() {
|
||||
local var_name="$1"
|
||||
local expected_pattern="$2"
|
||||
if ! nvim -i NONE --headless --cmd "echo $var_name" +q! 2>&1 | grep "$expected_pattern" ; then
|
||||
fail "Provider $var_name doesn't match expected pattern '$expected_pattern'"
|
||||
local output=$(nvim -i NONE --headless --cmd "echo $var_name" +q! 2>&1)
|
||||
local exit_code=$?
|
||||
|
||||
if [ $exit_code -ne 0 ]; then
|
||||
echo "neovim command failed with code: $exit_code and output:"
|
||||
fail "$output"
|
||||
elif ! grep "$expected_pattern" "$output" ; then
|
||||
echo "Provider $var_name doesn't match expected pattern '$expected_pattern'"
|
||||
echo "Output:"
|
||||
fail "$output"
|
||||
fi
|
||||
|
||||
# assuming we enabled all providers
|
||||
assertFileExists "$output"
|
||||
}
|
||||
|
||||
# Ensure the main binary exists
|
||||
|
|
@ -67,20 +78,16 @@ in
|
|||
assertBinaryContains "$nvimBin" "-my-suffix/rplugin.vim"
|
||||
|
||||
# 2. withPerl: Check if nvim-perl binary exists and host prog is set
|
||||
assertFileExists "home-path/bin/nvim-perl"
|
||||
assertNeovimExpr "g:perl_host_prog" "nvim-perl"
|
||||
assertNeovimExpr "g:perl_host_prog" "perl"
|
||||
|
||||
# 3. withPython3: Check if nvim-python3 binary exists and host prog is set
|
||||
assertFileExists "home-path/bin/nvim-python3"
|
||||
assertNeovimExpr "g:python3_host_prog" "python3"
|
||||
|
||||
# 4. withRuby: Check if nvim-ruby binary exists, GEM_HOME and host prog are set
|
||||
assertFileExists "home-path/bin/nvim-ruby"
|
||||
assertBinaryContains "$nvimBin" "GEM_HOME="
|
||||
assertNeovimExpr "g:ruby_host_prog" "ruby"
|
||||
|
||||
# 5. withNodeJs: Check if nvim-node binary exists and host prog is set
|
||||
assertFileExists "home-path/bin/nvim-node"
|
||||
assertNeovimExpr "g:node_host_prog" "node"
|
||||
|
||||
# 6. waylandSupport: Check for wl-clipboard path in wrapper's PATH modification
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue