mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
emacs: add test case for darwin
This commit is contained in:
parent
d1a3298de0
commit
f921fd71bb
4 changed files with 37 additions and 0 deletions
|
@ -173,6 +173,7 @@ in import nmtSrc {
|
||||||
./modules/xresources
|
./modules/xresources
|
||||||
] ++ lib.optionals isDarwin [
|
] ++ lib.optionals isDarwin [
|
||||||
./modules/launchd
|
./modules/launchd
|
||||||
|
./modules/services/emacs-darwin
|
||||||
./modules/services/espanso-darwin
|
./modules/services/espanso-darwin
|
||||||
./modules/services/git-sync-darwin
|
./modules/services/git-sync-darwin
|
||||||
./modules/services/imapnotify-darwin
|
./modules/services/imapnotify-darwin
|
||||||
|
|
13
tests/modules/services/emacs-darwin/basic.nix
Normal file
13
tests/modules/services/emacs-darwin/basic.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }: {
|
||||||
|
emacs = { enable = true; };
|
||||||
|
|
||||||
|
test.stubs.nix = { };
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
serviceFile=LaunchAgents/org.nix-community.home.emacs.plist
|
||||||
|
|
||||||
|
assertFileExists "$serviceFile"
|
||||||
|
|
||||||
|
assertFileContent "$serviceFile" ${./expected-agent.plist}
|
||||||
|
'';
|
||||||
|
}
|
1
tests/modules/services/emacs-darwin/default.nix
Normal file
1
tests/modules/services/emacs-darwin/default.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ emacs = ./basic.nix; }
|
22
tests/modules/services/emacs-darwin/expected-agent.plist
Normal file
22
tests/modules/services/emacs-darwin/expected-agent.plist
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>KeepAlive</key>
|
||||||
|
<dict>
|
||||||
|
<key>Crashed</key>
|
||||||
|
<true/>
|
||||||
|
<key>SuccessfulExit</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
<key>Label</key>
|
||||||
|
<string>org.nix-community.home.emacs</string>
|
||||||
|
<key>ProgramArguments</key>
|
||||||
|
<array>
|
||||||
|
<string>@emacs/bin/emacs</string>
|
||||||
|
<string>--fg-daemon</string>
|
||||||
|
</array>
|
||||||
|
<key>RunAtLoad</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>%
|
Loading…
Reference in a new issue