google-code-export / get-flash-videos

Automatically exported from code.google.com/p/get-flash-videos
1 stars 0 forks source link

failed t/google_video_search.t #229

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ LANG=C make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 
'blib/lib', 'blib/arch')" t/*.t
t/google_video_search.t .. There is no form with the requested fields at 
/home/takaki/deb/work/get-flash-videos-1.24/blib/lib/FlashVideo/Site/Googlevideo
search.pm line 15
There is no form with the requested fields at /usr/share/perl5/WWW/Mechanize.pm 
line 1893.
# Looks like your test exited with 255 before it could output anything.
t/google_video_search.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/2 subtests 
t/json.t ................. ok   
t/load.t ................. ok   
t/prefs.t ................ ok     
t/rtmpdownloader.t ....... ok   
t/title_to_filename.t .... ok     
t/url.t .................. skipped: Not going online, set SITE to run these 
tests
t/utils.t ................ ok   

Test Summary Report
-------------------
t/google_video_search.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 0.
Files=8, Tests=66,  0 wallclock secs ( 0.07 usr  0.03 sys +  0.54 cusr  0.08 
csys =  0.72 CPU)
Result: FAIL
Failed 1/8 test programs. 0/66 subtests failed.
make: *** [test_dynamic] Error 255
$

It caused by HTTP redirect. Googlevideosearch.pm uses http://video.google.com/. 
But I live in Japan, it redirects to http://video.google.co.jp/. 

Original issue reported on code.google.com by taniguch...@gmail.com on 18 Jan 2011 at 1:58

GoogleCodeExporter commented 9 years ago
This is a patch.

--- get-flash-videos-1.24.orig/lib/FlashVideo/Site/Googlevideosearch.pm
+++ get-flash-videos-1.24/lib/FlashVideo/Site/Googlevideosearch.pm
@@ -10,6 +10,8 @@ sub search {

   my $browser = FlashVideo::Mechanize->new;

+  $browser->allow_redirects;
+
   $browser->get('http://video.google.com/');

   $browser->submit_form(

Original comment by taniguch...@gmail.com on 19 Jan 2011 at 10:58

GoogleCodeExporter commented 9 years ago
That patch lets the tests run for me, but one still fails:

PERL_DL_NONLAZY=1 /usr/bin/perl5.12.4 "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/google_video_search.t .. 1/2 
#   Failed test 'Results returned'
#   at t/google_video_search.t line 18.
# Looks like you failed 1 test of 2.
t/google_video_search.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

Original comment by kingjon3...@gmail.com on 8 Mar 2012 at 1:45

GoogleCodeExporter commented 9 years ago
Fixed thanks to psycotica, sorry I didn't notice the other patch here.

Original comment by zakflash...@gmail.com on 9 Apr 2012 at 4:10