You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
419 B

use Test::More;
use Modern::Perl;
use URI;
use lib 'lib';
use remotecmd ':all';
my $port = 22;
my $user = 'karchnu';
my $host = "karchnu.fr";
my $cmd = "ls /";
my $pattern = qr/etc/;
sub t_remotecmd {
my ($user, $host, $port, $cmd, $pattern) = @_;
my $ret = remotecmd $user, $host, $port, $cmd;
$ret =~ $pattern;
}
ok ((t_remotecmd $user, $host, $port, $cmd, $pattern) , "remote cmd" );
done_testing;