]> git.deb.at Git - pkg/blosxom.git/blobdiff - t/Setup
Add Setup script for test script symlinks, and README; remove test scripts.
[pkg/blosxom.git] / t / Setup
diff --git a/t/Setup b/t/Setup
new file mode 100755 (executable)
index 0000000..8334ff9
--- /dev/null
+++ b/t/Setup
@@ -0,0 +1,26 @@
+#!/usr/bin/env perl
+#
+# Script to setup test script symlinks, since CVS can't store them
+#
+
+use strict;
+use IO::File;
+
+my $DRIVER = 'driver';
+my $TESTS = 'driver_tests';
+die "cannot find driver file '$DRIVER'" unless -f $DRIVER;
+die "cannot find tests file '$TESTS'" unless -f $TESTS;
+
+my @tests = ();
+
+my $th = IO::File->new($TESTS, 'r') 
+  or die "cannot open tests file '$TESTS': $!";
+@tests = <$th>;
+close $th;
+
+for my $t (@tests) {
+  chomp $t;
+  print "symlink $DRIVER $t\n"; 
+  eval { symlink $DRIVER, $t } or die "symlink $DRIVER, $t failed: $!";
+} 
+