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
assertFileContains \
home-files/.bashrc \
'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"'
'';
{
programs = {
scmpuff.enable = true;
bash.enable = true;
};
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 = {
scmpuff.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 = {
scmpuff = {
enable = true;

View file

@ -1,20 +1,23 @@
{ pkgs, ... }: {
config = {
programs = {
scmpuff = {
enable = true;
enableBashIntegration = false;
enableZshIntegration = false;
};
bash.enable = true;
zsh.enable = true;
{ ... }:
{
programs = {
scmpuff = {
enable = true;
enableBashIntegration = false;
enableZshIntegration = false;
};
test.stubs.zsh = { };
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff} init -s'
'';
bash.enable = true;
zsh.enable = true;
};
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 = {
enable = true;
enableZshIntegration = false;
};
zsh.enable = true;
{ ... }:
{
programs = {
scmpuff = {
enable = true;
enableZshIntegration = false;
};
test.stubs.zsh = { };
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
'';
zsh.enable = true;
};
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 = { };
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"'
'';
{
programs = {
scmpuff.enable = true;
zsh.enable = true;
};
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
'';
}