Permalink
Browse files

check that the commands compile

  • Loading branch information...
1 parent 59f194b commit f7c363bc1ce429fa6da36746a8477fd33c37613f @maddingue committed Jan 7, 2013
Showing with 15 additions and 1 deletion.
  1. +1 −0 Changes
  2. +14 −1 t/00-load.t
View
@@ -1,6 +1,7 @@
Release history for RackMan
- Added missing prereqs.
+ - Modified t/00-load.t to compile check the commands.
- Modified t/01-programs.t so it only execute the tests in environments where
Test::Cmd can find and load the required modules.
- Fixed t/50-rackman-scm.t so it (hopefully) passes on Win32.
View
@@ -32,8 +32,21 @@ my @modules = qw<
RackTables::Types
>;
-plan tests => ~~@modules;
+my @commands = qw<
+ cfengine-tags
+ cisco-status
+ rack
+ racktables-check
+>;
+
+plan tests => @modules + @commands;
use_ok($_) or print "Bail out!\n" for @modules;
+for my $command (@commands) {
+ my $path = "bin/$command";
+ (my $name = $command) =~ s/\W/_/g;
+ ok eval "package $name; require '$path'; 1", "check $path" or diag $@;
+}
+
diag( "Testing RackMan $RackMan::VERSION, Perl $], $^X" );

0 comments on commit f7c363b

Please sign in to comment.