scmpuff: clean up tests

Stub the scmpuff package. Also remove unnecessary `config` wrapping.
This commit is contained in:
Robert Helgesson 2023-02-07 22:19:10 +01:00
parent edb3645383
commit 7529a2674a
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
7 changed files with 88 additions and 71 deletions

View file

@ -1,15 +1,17 @@
{ pkgs, ... }: { { ... }:
config = {
programs = {
scmpuff.enable = true;
bash.enable = true;
};
nmt.script = '' {
assertFileExists home-files/.bashrc programs = {
assertFileContains \ scmpuff.enable = true;
home-files/.bashrc \ bash.enable = true;
'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"'
'';
}; };
test.stubs.scmpuff = { };
nmt.script = ''
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
'';
} }

View file

@ -1,4 +1,6 @@
{ pkgs, lib, ... }: { { lib, ... }:
{
programs = { programs = {
scmpuff.enable = true; scmpuff.enable = true;
fish.enable = true; fish.enable = true;

View file

@ -1,15 +1,17 @@
{ pkgs, ... }: { { ... }:
config = {
programs = {
scmpuff = {
enable = true;
enableBashIntegration = false;
};
bash.enable = true;
};
nmt.script = '' {
assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff}/bin/scmpuff' programs = {
''; scmpuff = {
enable = true;
enableBashIntegration = false;
};
bash.enable = true;
}; };
test.stubs.scmpuff = { };
nmt.script = ''
assertFileNotRegex home-files/.bashrc '@scmpuff@/bin/scmpuff'
'';
} }

View file

@ -1,4 +1,6 @@
{ pkgs, lib, ... }: { { lib, ... }:
{
programs = { programs = {
scmpuff = { scmpuff = {
enable = true; enable = true;

View file

@ -1,20 +1,23 @@
{ pkgs, ... }: { { ... }:
config = {
programs = { {
scmpuff = { programs = {
enable = true; scmpuff = {
enableBashIntegration = false; enable = true;
enableZshIntegration = false; enableBashIntegration = false;
}; enableZshIntegration = false;
bash.enable = true;
zsh.enable = true;
}; };
bash.enable = true;
test.stubs.zsh = { }; zsh.enable = true;
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff} init -s'
'';
}; };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s'
assertFileNotRegex home-files/.bashrc '@scmpuff@ init -s'
'';
} }

View file

@ -1,17 +1,20 @@
{ pkgs, ... }: { { ... }:
config = {
programs = { {
scmpuff = { programs = {
enable = true; scmpuff = {
enableZshIntegration = false; enable = true;
}; enableZshIntegration = false;
zsh.enable = true;
}; };
zsh.enable = true;
test.stubs.zsh = { };
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
'';
}; };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s'
'';
} }

View file

@ -1,17 +1,20 @@
{ pkgs, ... }: { { ... }:
config = {
programs = {
scmpuff.enable = true;
zsh.enable = true;
};
test.stubs.zsh = { }; {
programs = {
nmt.script = '' scmpuff.enable = true;
assertFileExists home-files/.zshrc zsh.enable = true;
assertFileContains \
home-files/.zshrc \
'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"'
'';
}; };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
'';
} }