|
Revision 12377, 0.6 kB
(checked in by yusukebe, 6 months ago)
|
|
Checking in changes prior to tagging of version 0.04. Changelog diff is:
Index: Changes
===================================================================
--- Changes (リビジョン 12375)
+++ Changes (作業コピー)
@@ -1,4 +1,5 @@
Revision history for WWW-YourFileHost?
+0.04 MON MAY 26 01:00:00 2008
0.03 FRI Apr 25 11:13:00 2008
remove perlcritic test
0.02 Wed Dec 12 22:33:21 2007
|
| Line | |
|---|
| 1 | #!/usr/bin/perl |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | use LWP::UserAgent; |
|---|
| 6 | use WWW::YourFileHost; |
|---|
| 7 | use Test::More tests => 4; |
|---|
| 8 | |
|---|
| 9 | my $url = "http://www.yourfilehost.com/media.php?cat=video&file=guns_dont_kill_people.flv"; |
|---|
| 10 | my $ua = LWP::UserAgent->new( agent => "WWW::YourFileHost" ); |
|---|
| 11 | $ua->cookie_jar( HTTP::Cookies->new( |
|---|
| 12 | file => '', |
|---|
| 13 | autosave => 1, |
|---|
| 14 | )); |
|---|
| 15 | |
|---|
| 16 | my $res = WWW::YourFileHost->new( url => $url , ua => $ua ); |
|---|
| 17 | isa_ok $res, 'WWW::YourFileHost'; |
|---|
| 18 | |
|---|
| 19 | my $checksum = 'a5f6dd20981c6b3a69e949b289613b07'; |
|---|
| 20 | like $res->photo, qr/$checksum\.jpg$/, 'photo'; |
|---|
| 21 | like $res->video_id, qr/$checksum\.flv/, 'video_id'; |
|---|
| 22 | is $res->embed, $url; |
|---|
| 23 | |
|---|