comparison tests/modules.sh @ 1:bc8961a81af6 release

2007-08-13 22:53:14 by steve Initial revision
author steve
date Mon, 13 Aug 2007 22:53:14 +0000
parents
children 8503c495b169
comparison
equal deleted inserted replaced
0:30c6796bded8 1:bc8961a81af6
1 #!/bin/sh
2 #
3 # Automatically attempt to create a test which ensures all the modules
4 # used in the code are availabe.
5 #
6 # Steve
7 # --
8 # http://www.steve.org.uk/
9 #
10 # $Id: modules.sh,v 1.1.1.1 2007-08-13 22:53:14 steve Exp $
11 #
12
13 cat <<EOF
14 #!/usr/bin/perl -w -I..
15 #
16 # Test that all the Perl modules we require are available.
17 #
18 # This list is automatically generated by modules.sh
19 #
20 # Steve
21 # --
22 #
23
24 use Test::More qw( no_plan );
25
26 EOF
27
28
29 for i in `rgrep '^use ' .. | awk '{print $2}' | tr -d
30 \;\(\) | sort | uniq`; \
31 do \
32 echo "BEGIN{ use_ok( '$i' ); }"; \
33 echo "require_ok( '$i' );" ; \
34 echo -e "\n" ; \
35 done
36