mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-07 15:54:31 +02:00
dev: Make the tests command able to select which test to launch
The `tests` command can either launch all tests (without any arguments), a specific test with `-t/--test` or choose a test with `-i/--interactive`
This commit is contained in:
parent
b1576362a7
commit
7908729711
4 changed files with 99 additions and 5 deletions
|
@ -32,11 +32,21 @@
|
|||
{
|
||||
name = "tests";
|
||||
help = "Run nixvim tests";
|
||||
command = ''
|
||||
echo "=> Running nixvim tests for the '${system}' architecture..."
|
||||
command =
|
||||
let
|
||||
launchTest = pkgs.writeShellApplication {
|
||||
name = "launch-tests";
|
||||
runtimeInputs = with pkgs; [
|
||||
jq
|
||||
fzf
|
||||
];
|
||||
|
||||
${nix} build .#checks.${system}.tests "$@"
|
||||
'';
|
||||
text = builtins.readFile ./launch-test.sh;
|
||||
};
|
||||
in
|
||||
''
|
||||
NIXVIM_SYSTEM=${system} NIXVIM_NIX_COMMAND=${nix} ${lib.getExe launchTest} "$@"
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "test-lib";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue