diff --git a/tests/default.nix b/tests/default.nix index 3d0d23b99..ef63c7bf8 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -36,6 +36,7 @@ import nmt { // import ./modules/misc/pam // import ./modules/misc/xsession // import ./modules/programs/firefox + // import ./modules/programs/rofi // import ./modules/systemd ) // import ./modules/home-environment diff --git a/tests/modules/programs/rofi/assert-on-both-theme-and-colors-expected.json b/tests/modules/programs/rofi/assert-on-both-theme-and-colors-expected.json new file mode 100644 index 000000000..808288f41 --- /dev/null +++ b/tests/modules/programs/rofi/assert-on-both-theme-and-colors-expected.json @@ -0,0 +1 @@ +["Cannot use the rofi options 'theme' and 'colors' simultaneously.\n"] \ No newline at end of file diff --git a/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix b/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix new file mode 100644 index 000000000..2558a2583 --- /dev/null +++ b/tests/modules/programs/rofi/assert-on-both-theme-and-colors.nix @@ -0,0 +1,33 @@ +{ config, lib, ... }: + +with lib; + +{ + config = { + programs.rofi = { + enable = true; + theme = "foo"; + colors = { + window = { + background = "background"; + border = "border"; + separator = "separator"; + }; + rows = { + }; + }; + }; + + home.file.result.text = + builtins.toJSON + (map (a: a.message) + (filter (a: !a.assertion) + config.assertions)); + + nmt.script = '' + assertFileContent \ + home-files/result \ + ${./assert-on-both-theme-and-colors-expected.json} + ''; + }; +} diff --git a/tests/modules/programs/rofi/default.nix b/tests/modules/programs/rofi/default.nix new file mode 100644 index 000000000..b42b43e94 --- /dev/null +++ b/tests/modules/programs/rofi/default.nix @@ -0,0 +1,3 @@ +{ + rofi-assert-on-both-theme-and-colors = import ./assert-on-both-theme-and-colors.nix; +}