summaryrefslogtreecommitdiff
path: root/tests/libtest/notexists.pl
blob: 31b9851ec27b40717649a0b609be595d5e106f3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env perl
# Check that given arguments do not exist on filesystem.
my $code = 0;
if ($#ARGV < 0) {
    print "Usage: $0 file1 [fileN]\n";
    exit 2;
}
while (@ARGV) {
    my $fname = shift @ARGV;
    if (-e $fname) {
        print "Found '$fname' when not supposed to exist.\n";
        $code = 1;
    }
}
exit $code;