diff --git a/tests/modules/programs/bottom/empty-settings.nix b/tests/modules/programs/bottom/empty-settings.nix index 71799c83..15c03c11 100644 --- a/tests/modules/programs/bottom/empty-settings.nix +++ b/tests/modules/programs/bottom/empty-settings.nix @@ -9,8 +9,13 @@ with lib; package = config.lib.test.mkStubPackage { }; }; - nmt.script = '' - assertPathNotExists home-files/.config/bottom + nmt.script = let + configDir = if pkgs.stdenv.isDarwin then + "home-files/Library/Application Support" + else + "home-files/.config"; + in '' + assertPathNotExists ${configDir}/bottom ''; }; } diff --git a/tests/modules/programs/bottom/example-settings-expected.toml b/tests/modules/programs/bottom/example-settings-expected.toml new file mode 100644 index 00000000..019a1825 --- /dev/null +++ b/tests/modules/programs/bottom/example-settings-expected.toml @@ -0,0 +1,6 @@ +[colors] +low_battery_color = "red" + +[flags] +avg_cpu = true +temperature_type = "c" diff --git a/tests/modules/programs/bottom/example-settings.nix b/tests/modules/programs/bottom/example-settings.nix index 30d8e21b..1777b526 100644 --- a/tests/modules/programs/bottom/example-settings.nix +++ b/tests/modules/programs/bottom/example-settings.nix @@ -26,16 +26,7 @@ with lib; in '' assertFileContent \ "${configDir}/bottom/bottom.toml" \ - ${ - builtins.toFile "example-settings-expected.toml" '' - [colors] - low_battery_color = "red" - - [flags] - avg_cpu = true - temperature_type = "c" - '' - } + ${./example-settings-expected.toml} ''; }; }