Mercurial > hg > chronicle
view tests/modules.sh @ 7:d23fa8a50a7f
2007-08-13 23:02:02 by steve
Ignore directories when looking for blog files.
Read two configuration files.
author | steve |
---|---|
date | Mon, 13 Aug 2007 23:02:02 +0000 |
parents | 8503c495b169 |
children | 00ed5b99ccb0 |
line wrap: on
line source
#!/bin/sh # # Automatically attempt to create a test which ensures all the modules # used in the code are availabe. # # Steve # -- # http://www.steve.org.uk/ # # $Id: modules.sh,v 1.2 2007-08-13 22:55:11 steve Exp $ # cat <<EOF #!/usr/bin/perl -w -I.. # # Test that all the Perl modules we require are available. # # This list is automatically generated by modules.sh # # Steve # -- # use Test::More qw( no_plan ); EOF for i in `rgrep '^use ' .. | awk '{print $2}' | tr -d \;\(\) | sort | uniq`; \ do \ echo "BEGIN{ use_ok( '$i' ); }"; \ echo "require_ok( '$i' );" ; \ echo -e "\n" ; \ done