Skip to content

Commit

Permalink
initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
guillomovitch committed Aug 26, 2012
1 parent 7a38343 commit 53a3ecf
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions t/apps/inventory.t
@@ -0,0 +1,30 @@
#!/usr/bin/perl

use strict;
use warnings;

use English qw(-no_match_vars);
use IPC::Run qw(run);

use Test::More tests => 3;

my ($out, $err, $rc);

($out, $err, $rc) = run_inventory('--help');
ok($rc == 0, '--help exit status');
like(
$out,
qr/^Usage:/,
'--help stdout'
);
is($err, '', '--help stderr');

sub run_inventory {
my ($args) = @_;
my @args = $args ? split(/\s+/, $args) : ();
run(
[ $EXECUTABLE_NAME, 'fusioninventory-inventory', @args ],
\my ($in, $out, $err)
);
return ($out, $err, $CHILD_ERROR >> 8);
}

0 comments on commit 53a3ecf

Please sign in to comment.