aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-06-05 20:19:27 +0200
committerYang Tse <yangsita@gmail.com>2012-06-05 20:20:40 +0200
commit2b56e4c1bb31dc69517156a1c70a264a6f6e91e4 (patch)
treebccb9de80370c85203be68a7aa59e127098e9c40 /tests/libtest
parent62f374b19e2c6cfd417df4a6781a8b8e0a338df4 (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')
-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;