3
0
Fork 0
forked from mirrors/nixpkgs

oh-my-zsh: Add test

This commit is contained in:
Tim Steinbach 2020-11-04 20:37:50 -05:00
parent 9907a2d48b
commit 9813539969
No known key found for this signature in database
GPG key ID: FD36A5EAAC49035A
3 changed files with 21 additions and 0 deletions

View file

@ -254,6 +254,7 @@ in
novacomd = handleTestOn ["x86_64-linux"] ./novacomd.nix {};
nsd = handleTest ./nsd.nix {};
nzbget = handleTest ./nzbget.nix {};
oh-my-zsh = handleTest ./oh-my-zsh.nix {};
openarena = handleTest ./openarena.nix {};
openldap = handleTest ./openldap.nix {};
opensmtpd = handleTest ./opensmtpd.nix {};

18
nixos/tests/oh-my-zsh.nix Normal file
View file

@ -0,0 +1,18 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "oh-my-zsh";
machine = { pkgs, ... }:
{
programs.zsh = {
enable = true;
ohMyZsh.enable = true;
};
};
testScript = ''
start_all()
machine.succeed("touch ~/.zshrc")
machine.succeed("zsh -c 'source /etc/zshrc && echo $ZSH | grep oh-my-zsh-${pkgs.oh-my-zsh.version}'")
'';
})

View file

@ -67,6 +67,8 @@ stdenv.mkDerivation rec {
'';
passthru = {
tests = { inherit (nixosTests) oh-my-zsh; };
updateScript = writeScript "update.sh" ''
#!${stdenv.shell}
set -o errexit