jujutsu: add module
This commit is contained in:
parent
f2d6291150
commit
c4f3a37071
8 changed files with 130 additions and 0 deletions
4
tests/modules/programs/jujutsu/default.nix
Normal file
4
tests/modules/programs/jujutsu/default.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
jujutsu-example-config = ./example-config.nix;
|
||||
jujutsu-empty-config = ./empty-config.nix;
|
||||
}
|
||||
11
tests/modules/programs/jujutsu/empty-config.nix
Normal file
11
tests/modules/programs/jujutsu/empty-config.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.jujutsu.enable = true;
|
||||
|
||||
test.stubs.jujutsu = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.jjconfig.toml
|
||||
'';
|
||||
}
|
||||
27
tests/modules/programs/jujutsu/example-config.nix
Normal file
27
tests/modules/programs/jujutsu/example-config.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
settings = {
|
||||
user = {
|
||||
name = "John Doe";
|
||||
email = "jdoe@example.org";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.jjconfig.toml
|
||||
assertFileContent \
|
||||
home-files/.jjconfig.toml \
|
||||
${
|
||||
builtins.toFile "expected.toml" ''
|
||||
[user]
|
||||
email = "jdoe@example.org"
|
||||
name = "John Doe"
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue