Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: dd4e5f4ed2
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (13 sloc) 0.487 kB
use Test::More tests => 7;
BEGIN { use_ok WWW::Shorten::Metamark };
my $url = 'http://dave.org.uk/';
my $short = makeashorterlink( $url );
ok((defined $short), 'Reasonable response');
like ( $short => qr{^http://xrl\.us/\w+$}, 'make it shorter' );
is ( makealongerlink( $short ) => $url, 'make it longer' );
my ($rs) = $short =~ m# / (\w+) $ #x;
is ( makealongerlink($rs) => $url, 'make it longer by Id' );
eval { &makeashorterlink() };
ok($@);
eval { &makealongerlink() };
ok($@);
Jump to Line
Something went wrong with that request. Please try again.