diff options
author | Yang Tse <yangsita@gmail.com> | 2012-06-05 20:19:27 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-05 20:20:40 +0200 |
commit | 2b56e4c1bb31dc69517156a1c70a264a6f6e91e4 (patch) | |
tree | bccb9de80370c85203be68a7aa59e127098e9c40 /tests/libtest/notexists.pl | |
parent | 62f374b19e2c6cfd417df4a6781a8b8e0a338df4 (diff) |
tests 1334 to 1363 revisited.
Add a postcheck section to verify unintended file creation.
Remove needless <file> checks in verify section. Renumbering where appropriate.
Diffstat (limited to 'tests/libtest/notexists.pl')
-rwxr-xr-x | tests/libtest/notexists.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/libtest/notexists.pl b/tests/libtest/notexists.pl new file mode 100755 index 000000000..31b9851ec --- /dev/null +++ b/tests/libtest/notexists.pl @@ -0,0 +1,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; |