aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/programs/alot
diff options
context:
space:
mode:
Diffstat (limited to 'home-manager/tests/modules/programs/alot')
-rw-r--r--home-manager/tests/modules/programs/alot/alot-expected.conf37
-rw-r--r--home-manager/tests/modules/programs/alot/alot.nix36
-rw-r--r--home-manager/tests/modules/programs/alot/default.nix1
3 files changed, 74 insertions, 0 deletions
diff --git a/home-manager/tests/modules/programs/alot/alot-expected.conf b/home-manager/tests/modules/programs/alot/alot-expected.conf
new file mode 100644
index 00000000000..6d3ace4a372
--- /dev/null
+++ b/home-manager/tests/modules/programs/alot/alot-expected.conf
@@ -0,0 +1,37 @@
+# Generated by Home Manager.
+# See http://alot.readthedocs.io/en/latest/configuration/config_options.html
+
+auto_remove_unread = True
+handle_mouse = True
+initial_command = search tag:inbox AND NOT tag:killed
+prefer_plaintext = True
+
+
+[tags]
+[bindings]
+
+
+[[bufferlist]]
+
+[[search]]
+
+[[envelope]]
+
+[[taglist]]
+
+[[thread]]
+
+
+[accounts]
+
+[[hm@example.com]]
+address=hm@example.com
+draft_box=maildir:///home/hm-user/Mail/hm@example.com/Drafts
+realname=H. M. Test
+sendmail_command=
+sent_box=maildir:///home/hm-user/Mail/hm@example.com/Sent
+auto_remove_unread = True
+ask_subject = False
+handle_mouse = True
+
+[[[abook]]]
diff --git a/home-manager/tests/modules/programs/alot/alot.nix b/home-manager/tests/modules/programs/alot/alot.nix
new file mode 100644
index 00000000000..40028b7aac6
--- /dev/null
+++ b/home-manager/tests/modules/programs/alot/alot.nix
@@ -0,0 +1,36 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+{
+ imports = [ ../../accounts/email-test-accounts.nix ];
+
+ config = {
+ accounts.email.accounts = {
+ "hm@example.com" = {
+ primary = true;
+ notmuch.enable = true;
+ alot = {
+ contactCompletion = { };
+ extraConfig = ''
+ auto_remove_unread = True
+ ask_subject = False
+ handle_mouse = True
+ '';
+ };
+ imap.port = 993;
+ };
+ };
+
+ programs.alot = { enable = true; };
+
+ nixpkgs.overlays =
+ [ (self: super: { alot = pkgs.writeScriptBin "dummy-alot" ""; }) ];
+
+ nmt.script = ''
+ assertFileExists home-files/.config/alot/config
+ assertFileContent home-files/.config/alot/config ${./alot-expected.conf}
+ '';
+ };
+}
+
diff --git a/home-manager/tests/modules/programs/alot/default.nix b/home-manager/tests/modules/programs/alot/default.nix
new file mode 100644
index 00000000000..9c912fdb43a
--- /dev/null
+++ b/home-manager/tests/modules/programs/alot/default.nix
@@ -0,0 +1 @@
+{ alot = ./alot.nix; }