1
1
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-10-05 17:07:29 +03:00

tmux: add test for #173

This commit is contained in:
Daiderd Jordan 2019-11-02 17:18:39 +01:00
parent 2b7812a129
commit 3fde04a384
No known key found for this signature in database
GPG Key ID: D02435D05B810C96
2 changed files with 18 additions and 0 deletions

View File

@ -107,6 +107,7 @@ let
tests.networking-networkservices = makeTest ./tests/networking-networkservices.nix;
tests.nixpkgs-overlays = makeTest ./tests/nixpkgs-overlays.nix;
tests.programs-ssh = makeTest ./tests/programs-ssh.nix;
tests.programs-tmux = makeTest ./tests/programs-tmux.nix;
tests.programs-zsh = makeTest ./tests/programs-zsh.nix;
tests.security-pki = makeTest ./tests/security-pki.nix;
tests.services-activate-system = makeTest ./tests/services-activate-system.nix;

17
tests/programs-tmux.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
programs.tmux.enable = true;
programs.tmux.enableVim = true;
test = ''
echo "checking for tmux in /sw/bin" >&2
test -x ${config.out}/sw/bin/tmux
grep "__ETC_ZSHRC_SOURCED=${"''"}" ${config.out}/sw/bin/tmux
grep "__NIX_DARWIN_SET_ENVIRONMENT_DONE=${"''"}" ${config.out}/sw/bin/tmux
echo "checking for tmux.conf in /etc" >&2
test -e ${config.out}/etc/tmux.conf
grep "setw -g mode-keys vi" ${config.out}/etc/tmux.conf
'';
}