Package: get-flash-videos
Version: 1.25~git2014.03.23-1
Severity: normal
Tags: patch

t/google_video_search.t currently fails with

  ok 1 - Results returned
  not ok 2 - Results look sane
  
  #   Failed test 'Results look sane'
  #   at t/google_video_search.t line 34.
  # Looks like you failed 1 test of 2.
 
We don't run this in package builds (and as of 1.25~git2014.03.23-2,
neither in autopkgtest checks) because it connects to the Internet,
but running it manually still shows the failure.

The reason is apparently just that some videos now have https
urls, but those don't get counted. Patch attached.
-- 
Niko Tyni   [email protected]
>From ad36427136f759d3f7be85a074a4f8bafe5a42a9 Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Wed, 14 Oct 2015 10:06:31 +0300
Subject: [PATCH] Count https video URLs in the results

Some video URLs on the Google video site now start
with https, making the test fail.
---
 t/google_video_search.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/google_video_search.t b/t/google_video_search.t
index 0609bb8..1c37398 100644
--- a/t/google_video_search.t
+++ b/t/google_video_search.t
@@ -23,7 +23,7 @@ my $sane_result_count = 0;
 foreach my $result (@results) {
   if ((ref($result) eq 'HASH') and
       $result->{name} and
-      $result->{url} =~ m'^http://') {
+      $result->{url} =~ m'^https?://') {
     $sane_result_count++;
   }
 }
-- 
2.5.1

Reply via email to