tix/test/watch.test.nix

20 lines
374 B
Nix
Raw Normal View History

2024-01-03 03:07:39 +00:00
{
describe,
it,
...
}: let
2024-01-03 01:27:47 +00:00
mockpkgs = {
writeShellScriptBin = name: content: content;
inotify-tools = "inotify-tools";
};
watch = import ../tix/watch.nix mockpkgs;
in
2024-01-03 03:07:39 +00:00
describe "watch" [
2024-01-03 06:47:16 +00:00
(it "contains the command" {
actual = builtins.match ".*(run me).*" ( watch {
cmd = "run me";
} );
expected = ["run me"];
2024-01-03 03:07:39 +00:00
})
]