diff options
author | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2012-01-22 11:07:58 -0500 |
---|---|---|
committer | Amitai Schlair <schmonz-web-ikiwiki@schmonz.com> | 2012-01-22 11:07:58 -0500 |
commit | ad0e56cdcaaf76bc68d1b5c56e6845307b51c44a (patch) | |
tree | e1d5800fa9e289e3e131057e3814a462dc3baf60 /t | |
parent | c74571c7582b7ce3111841a0229f84f7059711aa (diff) | |
download | ikiwiki-ad0e56cdcaaf76bc68d1b5c56e6845307b51c44a.tar ikiwiki-ad0e56cdcaaf76bc68d1b5c56e6845307b51c44a.tar.gz |
Define required programs and modules at top for easy spotting.
Diffstat (limited to 't')
-rwxr-xr-x | t/cvs.t | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -5,6 +5,17 @@ use Test::More; my $total_tests = 9; use IkiWiki; my $default_test_methods = '^test_*'; +my @required_programs = qw( + cvs + cvsps +); +my @required_modules = qw( + File::chdir + File::MimeInfo + Date::Parse + File::Temp + File::ReadBackwards +); my $dir = "/tmp/ikiwiki-test-cvs.$$"; # TESTS FOR GENERAL META-BEHAVIOR @@ -336,23 +347,14 @@ main(); sub _plan_for_test_more { my $can_plan = shift; - foreach my $program (qw( - cvs - cvsps - )) { + foreach my $program (@required_programs) { my $program_path = `which $program`; chomp $program_path; return plan(skip_all => "$program not available") unless -x $program_path; } - foreach my $module (qw( - File::chdir - File::MimeInfo - Date::Parse - File::Temp - File::ReadBackwards - )) { + foreach my $module (@required_modules) { eval qq{use $module}; return plan(skip_all => "$module not available") if $@; |