mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-05 16:41:04 +01:00
tests/jrnl: add tests
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
89544bf918
commit
2ed842c9ff
4 changed files with 63 additions and 0 deletions
4
tests/modules/programs/jrnl/default.nix
Normal file
4
tests/modules/programs/jrnl/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
jrnl-empty-settings = ./jrnl-empty-settings.nix;
|
||||||
|
jrnl-basic-settings = ./jrnl-basic-settings.nix;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
colors:
|
||||||
|
body: none
|
||||||
|
date: green
|
||||||
|
tags: yellow
|
||||||
|
title: cyan
|
||||||
|
default_hour: 9
|
||||||
|
default_minute: 0
|
||||||
|
editor: vim
|
||||||
|
encrypt: false
|
||||||
|
highlight: true
|
||||||
|
indent_character: '|'
|
||||||
|
journals:
|
||||||
|
default: ~/journals/journal.txt
|
||||||
|
work: ~/journals/work.txt
|
||||||
|
linewrap: 80
|
||||||
|
tagsymbols: '@'
|
||||||
|
template: false
|
||||||
|
timeformat: '%Y-%m-%d %H:%M'
|
||||||
32
tests/modules/programs/jrnl/jrnl-basic-settings.nix
Normal file
32
tests/modules/programs/jrnl/jrnl-basic-settings.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
programs.jrnl = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
journals = {
|
||||||
|
default = "~/journals/journal.txt";
|
||||||
|
work = "~/journals/work.txt";
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
body = "none";
|
||||||
|
date = "green";
|
||||||
|
tags = "yellow";
|
||||||
|
title = "cyan";
|
||||||
|
};
|
||||||
|
default_hour = 9;
|
||||||
|
default_minute = 0;
|
||||||
|
editor = "vim";
|
||||||
|
encrypt = false;
|
||||||
|
highlight = true;
|
||||||
|
indent_character = "|";
|
||||||
|
linewrap = 80;
|
||||||
|
tagsymbols = "@";
|
||||||
|
template = false;
|
||||||
|
timeformat = "%Y-%m-%d %H:%M";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.config/jrnl/jrnl.yaml
|
||||||
|
assertFileContent home-files/.config/jrnl/jrnl.yaml ${./jrnl-basic-settings-expected.yaml}
|
||||||
|
'';
|
||||||
|
}
|
||||||
9
tests/modules/programs/jrnl/jrnl-empty-settings.nix
Normal file
9
tests/modules/programs/jrnl/jrnl-empty-settings.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
programs.jrnl = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertPathNotExists home-files/.config/jrnl/jrnl.yaml
|
||||||
|
'';
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue