8334ff95e4592de3e3ecc2d4cca5fa97ccbf7c05
[matthijs/upstream/blosxom.git] / t / Setup
1 #!/usr/bin/env perl
2 #
3 # Script to setup test script symlinks, since CVS can't store them
4 #
5
6 use strict;
7 use IO::File;
8
9 my $DRIVER = 'driver';
10 my $TESTS = 'driver_tests';
11 die "cannot find driver file '$DRIVER'" unless -f $DRIVER;
12 die "cannot find tests file '$TESTS'" unless -f $TESTS;
13
14 my @tests = ();
15
16 my $th = IO::File->new($TESTS, 'r') 
17   or die "cannot open tests file '$TESTS': $!";
18 @tests = <$th>;
19 close $th;
20
21 for my $t (@tests) {
22   chomp $t;
23   print "symlink $DRIVER $t\n"; 
24   eval { symlink $DRIVER, $t } or die "symlink $DRIVER, $t failed: $!";
25
26