From c9cb3b468f663d655cbc82fd6f60510836f10796 Mon Sep 17 00:00:00 2001 From: Gavin Carr Date: Fri, 18 Jun 2010 17:59:08 +0100 Subject: [PATCH] Add symlink test cases, remove obsolete test infrastructure. Add symlink test cases, since we're now using a VCS that supports symlinks! Therefore remove obsolete Setup and Tests infrastructure files. Add a Makefile to let us just to 'make' or 'make test' in the test directory. --- t/01_templates.t | 1 + t/02_smoketest.t | 1 + t/03_interpolate.t | 1 + t/03_permalinks.t | 1 + t/04_plugin_dir.t | 1 + t/04_plugin_list.t | 1 + t/08_static_basic.t | 1 + t/Makefile | 6 ++++++ t/README | 7 ++----- t/Setup | 27 --------------------------- t/Tests | 7 ------- 11 files changed, 15 insertions(+), 39 deletions(-) create mode 120000 t/01_templates.t create mode 120000 t/02_smoketest.t create mode 120000 t/03_interpolate.t create mode 120000 t/03_permalinks.t create mode 120000 t/04_plugin_dir.t create mode 120000 t/04_plugin_list.t create mode 120000 t/08_static_basic.t create mode 100644 t/Makefile delete mode 100755 t/Setup delete mode 100644 t/Tests diff --git a/t/01_templates.t b/t/01_templates.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/01_templates.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/02_smoketest.t b/t/02_smoketest.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/02_smoketest.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/03_interpolate.t b/t/03_interpolate.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/03_interpolate.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/03_permalinks.t b/t/03_permalinks.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/03_permalinks.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/04_plugin_dir.t b/t/04_plugin_dir.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/04_plugin_dir.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/04_plugin_list.t b/t/04_plugin_list.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/04_plugin_list.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/08_static_basic.t b/t/08_static_basic.t new file mode 120000 index 0000000..e42f284 --- /dev/null +++ b/t/08_static_basic.t @@ -0,0 +1 @@ +driver \ No newline at end of file diff --git a/t/Makefile b/t/Makefile new file mode 100644 index 0000000..6caa89e --- /dev/null +++ b/t/Makefile @@ -0,0 +1,6 @@ + +all: test + +test: + prove *.t + diff --git a/t/README b/t/README index 53ea291..e8fdbdb 100644 --- a/t/README +++ b/t/README @@ -1,7 +1,6 @@ Running Tests ============= - perl ./Setup prove *.t @@ -11,10 +10,8 @@ Test Layout To add a new test, you want to add two things - a test script (which is typically just a symlink to the main 'driver' script), and a test -directory. If you just want a symlink test script, then add your -test script name to 'Tests', and rerun Setup. To add a new test -directory, you're probably best just to copy one of the existing -ones - 'templates' is a good choice: +directory. To add a new test directory, you're probably best just to +copy one of the existing ones - 'templates' is a good choice: cp -rp templates newtest diff --git a/t/Setup b/t/Setup deleted file mode 100755 index 93f0733..0000000 --- a/t/Setup +++ /dev/null @@ -1,27 +0,0 @@ -#!/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 = '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; - unlink $t if -l $t; - print "symlink $DRIVER $t\n"; - eval { symlink $DRIVER, $t } or die "symlink $DRIVER, $t failed: $!"; -} - diff --git a/t/Tests b/t/Tests deleted file mode 100644 index 0a999a3..0000000 --- a/t/Tests +++ /dev/null @@ -1,7 +0,0 @@ -01_templates.t -02_smoketest.t -03_permalinks.t -03_interpolate.t -04_plugin_dir.t -04_plugin_list.t -08_static_basic.t -- 2.30.2