tests: cleanup tests to better use callTest pattern

e.g. Prefer taking `pkgs.*` attrs directly as function arguments.
This commit is contained in:
Matt Sturgeon 2024-08-28 09:48:10 +01:00
parent 4a508ceee2
commit 036e11665f
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
7 changed files with 33 additions and 20 deletions

View file

@ -1,4 +1,7 @@
{ makeNixvimWithModule, pkgs }:
{
makeNixvimWithModule,
runCommandNoCCLocal,
}:
let
firstStage = makeNixvimWithModule {
module = {
@ -10,7 +13,7 @@ let
generated = secondStage.extend { extraConfigLua = "-- third stage"; };
in
pkgs.runCommand "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
runCommandNoCCLocal "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
config=$($printConfig)
for stage in "first" "second" "third"; do
if ! "$printConfig" | grep -q -- "-- $stage stage"; then