mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
system-path: add basic shell tests
This commit is contained in:
parent
8a67d1d4cf
commit
707cdd517b
4 changed files with 39 additions and 1 deletions
|
@ -89,10 +89,12 @@ let
|
|||
examples.simple = genExample ./modules/examples/simple.nix;
|
||||
|
||||
tests.system-packages = makeTest ./tests/system-packages.nix;
|
||||
tests.system-path-bash = makeTest ./tests/system-path-bash.nix;
|
||||
tests.system-path-fish = makeTest ./tests/system-path-fish.nix;
|
||||
tests.system-path-zsh = makeTest ./tests/system-path-zsh.nix;
|
||||
|
||||
}
|
||||
// (mapTestOn (packagePlatforms packageSet));
|
||||
|
||||
in
|
||||
|
||||
jobs
|
||||
|
|
12
tests/system-path-bash.nix
Normal file
12
tests/system-path-bash.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPath = [ pkgs.hello ];
|
||||
|
||||
programs.bash.enable = true;
|
||||
|
||||
test = ''
|
||||
echo checking systemPath in /etc/bashrc >&2
|
||||
grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/bashrc
|
||||
'';
|
||||
}
|
12
tests/system-path-fish.nix
Normal file
12
tests/system-path-fish.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPath = [ pkgs.hello ];
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
test = ''
|
||||
echo checking systemPath in /etc/fish/config.fish >&2
|
||||
grep 'set PATH ${pkgs.hello}/bin' ${config.out}/etc/fish/config.fish
|
||||
'';
|
||||
}
|
12
tests/system-path-zsh.nix
Normal file
12
tests/system-path-zsh.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPath = [ pkgs.hello ];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
test = ''
|
||||
echo checking systemPath in /etc/zshrc >&2
|
||||
grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/zshrc
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue