tests: add option test.stubs

This option provides a more convenient way to overlay dummy packages.
It also adds a function `config.lib.test.mkStubPackage` that can,
e.g., be used for `package` options.
This commit is contained in:
Robert Helgesson 2021-09-26 11:08:45 +02:00
parent b0651cc217
commit cb09a968e9
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
159 changed files with 753 additions and 981 deletions

View file

@ -10,8 +10,7 @@
zsh.enable = true;
};
nixpkgs.overlays =
[ (self: super: { zsh = pkgs.writeScriptBin "dummy" ""; }) ];
test.stubs.zsh = { };
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'

View file

@ -8,8 +8,7 @@
zsh.enable = true;
};
nixpkgs.overlays =
[ (self: super: { zsh = pkgs.writeScriptBin "dummy" ""; }) ];
test.stubs.zsh = { };
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'

View file

@ -5,8 +5,7 @@
zsh.enable = true;
};
nixpkgs.overlays =
[ (self: super: { zsh = pkgs.writeScriptBin "dummy" ""; }) ];
test.stubs.zsh = { };
nmt.script = ''
assertFileExists home-files/.zshrc