mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
tests/lazyworktree: add integration asserts
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -1 +1,4 @@
|
||||
{ lazyworktree-settings = ./settings.nix; }
|
||||
{
|
||||
lazyworktree-no-package-empty-settings = ./no-package-empty-settings.nix;
|
||||
lazyworktree-settings = ./settings.nix;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.lazyworktree = {
|
||||
enable = true;
|
||||
package = null;
|
||||
settings = { };
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-path/bin/lazyworktree
|
||||
assertPathNotExists home-files/.config/lazyworktree/config.yaml
|
||||
'';
|
||||
}
|
||||
@@ -1,6 +1,13 @@
|
||||
{
|
||||
programs.bash.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
programs.lazyworktree = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
worktree_dir = "~/.local/share/worktrees";
|
||||
sort_mode = "switched";
|
||||
@@ -21,5 +28,16 @@
|
||||
assertFileExists home-files/.config/lazyworktree/config.yaml
|
||||
assertFileContent home-files/.config/lazyworktree/config.yaml \
|
||||
${./config.yaml}
|
||||
|
||||
assertFileExists home-files/.bashrc
|
||||
assertFileContains home-files/.bashrc 'function lwt() {'
|
||||
assertFileContains home-files/.bashrc 'lazyworktree_dir="$(command lazyworktree "$@")" || return'
|
||||
|
||||
assertFileExists home-files/.zshrc
|
||||
assertFileContains home-files/.zshrc 'function lwt() {'
|
||||
assertFileContains home-files/.zshrc 'lazyworktree_dir="$(command lazyworktree "$@")" || return'
|
||||
|
||||
assertFileExists home-files/.config/fish/functions/lwt.fish
|
||||
assertFileContains home-files/.config/fish/functions/lwt.fish 'set -l lazyworktree_dir (command lazyworktree $argv)'
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user