diff options
Diffstat (limited to 'pkgs/by-name/ma/maid/test.nix')
-rw-r--r-- | pkgs/by-name/ma/maid/test.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/by-name/ma/maid/test.nix b/pkgs/by-name/ma/maid/test.nix new file mode 100644 index 0000000000000..722481f2dfcb2 --- /dev/null +++ b/pkgs/by-name/ma/maid/test.nix @@ -0,0 +1,20 @@ +{ runCommandLocal, maid }: + +runCommandLocal "test-maid-run" { + nativeBuildInputs = [ maid ]; +} + '' + mkdir -p $out/test + export HOME=$out + cd $out + touch test/a.iso test/b.txt + cat > rules.rb <<EOF + Maid.rules do + rule 'ISO' do + trash(dir('test/*.iso')) + end + end + EOF + maid clean --rules rules.rb --force + [ -f test/b.txt ] && [ ! -f test/a.iso ] + '' |