Skip to content

Commit

Permalink
Added minimum to test for broken commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Nov 8, 2010
1 parent c8779a6 commit 2d4eced
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/lib/Test/BrokenCmd.pm
@@ -0,0 +1,7 @@
use strict;
use warnings;

package Test::BrokenCmd;
use App::Cmd::Setup -app;

1;
10 changes: 10 additions & 0 deletions t/lib/Test/BrokenCmd/Command.pm
@@ -0,0 +1,10 @@
use strict;
use warnings;

package Test::BrokenCmd::Command;

use App::Cmd::Setup -command;

die "BROKEN";

1;
17 changes: 17 additions & 0 deletions t/setup-broken.t
@@ -0,0 +1,17 @@
use strict;
use warnings;

use Test::More 0.88;
use Test::Fatal;

use lib 't/lib';

isnt( exception {
require Test::BrokenCmd;
}, undef, 'using an obviously broken library should die' );

isnt( exception {
require Test::BrokenCmd::Command;
}, undef, 'the broken library is broken' );


0 comments on commit 2d4eced

Please sign in to comment.