#!/usr/bin/perl use strict; use warnings; use Test::More tests => 6; use Test::Cmd; my $cmd = Test::Cmd->new( prog => '/bin/uname' ); is $cmd->run, 0, 'uname ran okay'; is $cmd->stdout, "Linux", 'Test uname match 1'; like $cmd->stdout, qr/Linux/, 'Found uname parameter Linux'; my $cmd2 = Test::Cmd->new( prog => '/bin/uname -n' ); is $cmd2->run, 0, 'uname ran okay'; is $cmd2->stdout, "Desktop1", 'Test Uname match with node'; like $cmd2->stdout, qr/Desktop/, 'Found uname with node name';