From 3fde04a384d4edf68b726178349a12b9aeb1e05d Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 2 Nov 2019 17:18:39 +0100 Subject: [PATCH] tmux: add test for #173 --- release.nix | 1 + tests/programs-tmux.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/programs-tmux.nix diff --git a/release.nix b/release.nix index 5071d6a5..dd5e2b79 100644 --- a/release.nix +++ b/release.nix @@ -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; diff --git a/tests/programs-tmux.nix b/tests/programs-tmux.nix new file mode 100644 index 00000000..fdd3eacb --- /dev/null +++ b/tests/programs-tmux.nix @@ -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 + ''; +}