2.home-manager/tests/modules/programs/oh-my-posh/settings.nix
Austin Horstman 10f5a0cc4b tests/oh-my-posh: expand test coverage
Cover some more scenarios with the module.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-09-17 00:06:30 -05:00

39 lines
895 B
Nix

{
programs = {
bash.enable = true;
oh-my-posh = {
enable = true;
settings = {
version = 2;
final_space = true;
blocks = [
{
type = "prompt";
alignment = "left";
segments = [
{
type = "shell";
style = "plain";
template = "{{ .Name }} ";
}
];
}
];
};
};
};
nmt.script = ''
assertFileExists home-files/.config/oh-my-posh/config.json
assertFileContains \
home-files/.config/oh-my-posh/config.json \
'"version": 2'
assertFileContains \
home-files/.config/oh-my-posh/config.json \
'"final_space": true'
assertFileContains \
home-files/.bashrc \
'/bin/oh-my-posh init bash --config /home/hm-user/.config/oh-my-posh/config.json'
'';
}