blob: 722481f2dfcb2a98cd727a6f539815592b51899f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 ]
''
|