piew has asked for the wisdom of the Perl Monks concerning the following question:
Thanks in advances, piew#!/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';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Better arranging Test Suite
by Corion (Patriarch) on Aug 12, 2007 at 20:56 UTC | |
|
Re: Better arranging Test Suite
by xdg (Monsignor) on Aug 12, 2007 at 20:59 UTC | |
by piew (Initiate) on Aug 12, 2007 at 22:41 UTC | |
by xdg (Monsignor) on Aug 13, 2007 at 03:34 UTC |