luaPackages.fzf-lua: add tests (#382459)
This commit is contained in:
@@ -7,16 +7,16 @@
|
||||
# plenary utilities
|
||||
which,
|
||||
findutils,
|
||||
clang,
|
||||
coreutils,
|
||||
curl,
|
||||
cyrus_sasl,
|
||||
dbus,
|
||||
expat,
|
||||
fd,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
fixDarwinDylibNames,
|
||||
fzf,
|
||||
glib,
|
||||
glibc,
|
||||
gmp,
|
||||
@@ -36,10 +36,9 @@
|
||||
libuv,
|
||||
libxcrypt,
|
||||
libyaml,
|
||||
luajitPackages,
|
||||
lua-language-server,
|
||||
luajitPackages,
|
||||
mariadb,
|
||||
magic-enum,
|
||||
mpfr,
|
||||
neovim-unwrapped,
|
||||
openldap,
|
||||
@@ -47,19 +46,18 @@
|
||||
pcre,
|
||||
pkg-config,
|
||||
readline,
|
||||
ripgrep,
|
||||
rustPlatform,
|
||||
sol2,
|
||||
sqlite,
|
||||
tomlplusplus,
|
||||
tree-sitter,
|
||||
unbound,
|
||||
unzip,
|
||||
vimPlugins,
|
||||
vimUtils,
|
||||
yajl,
|
||||
zip,
|
||||
unzip,
|
||||
zlib,
|
||||
zziplib,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
final: prev:
|
||||
@@ -69,7 +67,6 @@ let
|
||||
luaAtLeast
|
||||
lua
|
||||
isLuaJIT
|
||||
isLua51
|
||||
;
|
||||
in
|
||||
{
|
||||
@@ -160,6 +157,48 @@ in
|
||||
'';
|
||||
});
|
||||
|
||||
fzf-lua = prev.fzf-lua.overrideAttrs {
|
||||
# FIXME: Darwin flaky tests
|
||||
# address already in use on second test run
|
||||
# Previewer transient failure
|
||||
doCheck = !stdenv.hostPlatform.isDarwin;
|
||||
checkInputs = [
|
||||
fd
|
||||
fzf
|
||||
ripgrep
|
||||
];
|
||||
nativeCheckInputs = [
|
||||
neovim-unwrapped
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# Linking the dependencies since makefile wants to clone them each time
|
||||
# for `make deps`
|
||||
mkdir -p deps
|
||||
ln -s ${vimPlugins.mini-nvim} deps/mini.nvim
|
||||
ln -s ${vimPlugins.nvim-web-devicons} deps/nvim-web-devicons
|
||||
|
||||
# TODO: remove with new nvim-web-devicons release
|
||||
# Disabled devicons test because we have old version as dep and fzf-lua checks for a new icon
|
||||
substituteInPlace tests/file/ui_spec.lua \
|
||||
--replace-fail \
|
||||
"T[\"files()\"][\"icons\"] = new_set({ parametrize = { { \"devicons\" }, { \"mini\" } } })" \
|
||||
"T[\"files()\"][\"icons\"] = new_set({ parametrize = { { \"mini\" } } })"
|
||||
|
||||
# TODO: Figure out why 2 files extra for `fd`
|
||||
substituteInPlace tests/file/ui_spec.lua \
|
||||
--replace-fail \
|
||||
"T[\"files()\"][\"executable\"] = new_set({ parametrize = { { \"fd\" }, { \"rg\" }, { \"find|dir\" } } }, {" \
|
||||
"T[\"files()\"][\"executable\"] = new_set({ parametrize = { { \"rg\" }, { \"find|dir\" } } }, {"
|
||||
|
||||
make test
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
};
|
||||
|
||||
# Until https://github.com/swarn/fzy-lua/pull/8 is merged,
|
||||
# we have to invoke busted manually
|
||||
fzy = prev.fzy.overrideAttrs (oa: {
|
||||
|
||||
Reference in New Issue
Block a user