aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.am2
-rwxr-xr-xtests/libtest/notexists.pl15
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 6170453a0..7b8d8fc04 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -51,7 +51,7 @@ INCLUDES = -I$(top_builddir)/include/curl \
endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
-test1022.pl Makefile.inc
+test1022.pl Makefile.inc notexists.pl
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
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;