1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-05 08:31:03 +01:00

tests/jrnl: add tests

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman 2025-11-21 20:38:35 -06:00
parent 89544bf918
commit 2ed842c9ff
4 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{
jrnl-empty-settings = ./jrnl-empty-settings.nix;
jrnl-basic-settings = ./jrnl-basic-settings.nix;
}

View file

@ -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'

View 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}
'';
}

View file

@ -0,0 +1,9 @@
{
programs.jrnl = {
enable = true;
};
nmt.script = ''
assertPathNotExists home-files/.config/jrnl/jrnl.yaml
'';
}