1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-19 17:49:45 +01:00

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

View file

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

View file

@ -1,5 +1,6 @@
{ pkgs, ... }: {
config = {
{ ... }:
{
programs = {
scmpuff = {
enable = true;
@ -10,11 +11,13 @@
zsh.enable = true;
};
test.stubs.zsh = { };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
assertFileNotRegex home-files/.bashrc '${pkgs.scmpuff} init -s'
assertFileNotRegex home-files/.zshrc '@scmpuff@ init -s'
assertFileNotRegex home-files/.bashrc '@scmpuff@ init -s'
'';
};
}

View file

@ -1,5 +1,6 @@
{ pkgs, ... }: {
config = {
{ ... }:
{
programs = {
scmpuff = {
enable = true;
@ -8,10 +9,12 @@
zsh.enable = true;
};
test.stubs.zsh = { };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileNotRegex home-files/.zshrc '${pkgs.scmpuff} init -s'
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 = { };
test.stubs = {
zsh = { };
scmpuff = { };
};
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(${pkgs.scmpuff}/bin/scmpuff init -s)"'
'eval "$(@scmpuff@/bin/scmpuff init -s)"'
'';
};
}