1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 23:21:02 +01:00
home-manager/tests/modules/programs/opencode/mixed-content.nix
Austin Horstman 53538044d9 tests/opencode: expand tests for agents / commands
Include various tests for the agents and command file generation and
different ways of configuring it.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-09-17 07:23:42 -05:00

30 lines
883 B
Nix

{
programs.opencode = {
enable = true;
commands = {
inline-command = ''
# Inline Command
This command is defined inline.
'';
path-command = ./test-command.md;
};
agents = {
inline-agent = ''
# Inline Agent
This agent is defined inline.
'';
path-agent = ./test-agent.md;
};
};
nmt.script = ''
assertFileExists home-files/.config/opencode/command/inline-command.md
assertFileExists home-files/.config/opencode/command/path-command.md
assertFileExists home-files/.config/opencode/agent/inline-agent.md
assertFileExists home-files/.config/opencode/agent/path-agent.md
assertFileContent home-files/.config/opencode/command/path-command.md \
${./test-command.md}
assertFileContent home-files/.config/opencode/agent/path-agent.md \
${./test-agent.md}
'';
}