htop: verify htoprc contents for example settings test

Fix ending the generated htoprc with a newline.
This commit is contained in:
Bart Bakker 2021-07-29 14:38:01 +02:00 committed by Robert Helgesson
parent e4553546cc
commit 447f80f676
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
3 changed files with 16 additions and 2 deletions

View File

@ -146,7 +146,8 @@ in {
home.packages = [ pkgs.htop ];
xdg.configFile."htop/htoprc" = mkIf (cfg.settings != { }) {
text = concatStringsSep "\n" (mapAttrsToList formatOption cfg.settings);
text = concatStringsSep "\n" (mapAttrsToList formatOption cfg.settings)
+ "\n";
};
};
}

View File

@ -0,0 +1,11 @@
color_scheme=6
cpu_count_from_one=0
delay=15
fields=0 48 17 18 38 39 40 2 46 47 49 1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
left_meter_modes=1 1 1 2
left_meters=AllCPUs2 Memory Swap Zram
right_meter_modes=2 2 2 2
right_meters=Tasks LoadAverage Uptime Systemd

View File

@ -37,7 +37,9 @@ with lib;
]);
nmt.script = ''
assertFileExists home-files/.config/htop/htoprc
htoprc=home-files/.config/htop/htoprc
assertFileExists $htoprc
assertFileContent $htoprc ${./example-htoprc.txt}
'';
};
}