diff --git a/t/scp.t b/t/scp.t new file mode 100644 index 0000000..1f810bb --- /dev/null +++ b/t/scp.t @@ -0,0 +1,16 @@ +use strict; +use warnings; + +use Test::More tests => 6; + +use URI (); +my $uri; + +$uri = URI->new("scp://user\@ssh.example.com/path"); + +is($uri->scheme, 'scp'); +is($uri->host, 'ssh.example.com'); +is($uri->port, 22); +is($uri->secure, 1); +is($uri->user, 'user'); +is($uri->password, undef); diff --git a/t/sftp.t b/t/sftp.t new file mode 100644 index 0000000..b3b37fc --- /dev/null +++ b/t/sftp.t @@ -0,0 +1,16 @@ +use strict; +use warnings; + +use Test::More tests => 6; + +use URI (); +my $uri; + +$uri = URI->new("sftp://user\@ssh.example.com/path"); + +is($uri->scheme, 'sftp'); +is($uri->host, 'ssh.example.com'); +is($uri->port, 22); +is($uri->secure, 1); +is($uri->user, 'user'); +is($uri->password, undef); diff --git a/t/ssh.t b/t/ssh.t new file mode 100644 index 0000000..49456ea --- /dev/null +++ b/t/ssh.t @@ -0,0 +1,16 @@ +use strict; +use warnings; + +use Test::More tests => 6; + +use URI (); +my $uri; + +$uri = URI->new("ssh://user\@ssh.example.com/path"); + +is($uri->scheme, 'ssh'); +is($uri->host, 'ssh.example.com'); +is($uri->port, 22); +is($uri->secure, 1); +is($uri->user, 'user'); +is($uri->password, undef);