tix/test/watch.test.nix

21 lines
375 B
Nix
Raw Permalink 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;
2024-01-03 11:17:47 +00:00
in [
(describe "watch" [
2024-01-03 06:47:16 +00:00
(it "contains the command" {
2024-01-03 06:54:28 +00:00
actual = builtins.match ".*(run me).*" (watch {
cmd = "run me";
});
2024-01-03 06:47:16 +00:00
expected = ["run me"];
2024-01-03 03:07:39 +00:00
})
2024-01-03 11:17:47 +00:00
])
]