]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
[urlinfo] update self test
authorbw1 <redacted>
Tue, 20 Feb 2018 22:15:47 +0000 (23:15 +0100)
committerbw1 <redacted>
Tue, 20 Feb 2018 22:15:47 +0000 (23:15 +0100)
scripts/urlinfo.pl

index 5a1b4a7031a71adb6983b8f42d7a09740d07e919..460e358a4a9118e1db113aaf1a8ed36082747915 100644 (file)
@@ -1,10 +1,12 @@
+use strict;
+use warnings;
 use 5.014;
 use utf8;
 use Encode;
 use Irssi;
 use POSIX ();
 
-our $VERSION = "1.4";
+our $VERSION = "1.5";
 our %IRSSI = (
     authors     => 'David Leadbeater',
     contact     => 'dgl@dgl.cx',
@@ -80,14 +82,14 @@ my %SITES = (
     items => [
       {
         domain => "youtu.be",
-        example => "http://youtu.be/wa1c6EU2bY0",
-        expected => "I Am The Resurrection (Remastered)",
+        example => "http://youtu.be/ghGoI7xVtSI",
+        expected => "Rick Astley - Never Gonna Give You Up (Live 1987)",
       },
       {
         domain => "youtube.com",
         path => "/watch",
-        example => "https://www.youtube.com/watch?v=q99JgYrgzco&list=PLE57B71744156439A",
-        expected => "I Wanna Be Adored (Remastered)",
+        example => "https://www.youtube.com/watch?v=ghGoI7xVtSI",
+        expected => "Rick Astley - Never Gonna Give You Up (Live 1987)",
       },
     ],
   },
@@ -111,7 +113,9 @@ my %SITES = (
     domain => "gist.github.com",
     from => ["og:title", "description"],
     example => "https://gist.github.com/dgl/792206",
-    expected => "dgl/installblead: An install script that installs a development version of perl (from git) and keeps a particular set of modules installed. Sort of perlbrew for blead, but not quite.",
+    expected => "An install script that installs a development version of perl (from ".
+                "git) and keeps a particular set of modules installed. Sort of ".
+                "perlbrew for blead, but not quite.",
   },
   github => {
     domain => "github.com",
@@ -237,7 +241,7 @@ sub msg {
 
   my $msg_time = time;
   my $tag = $server->{tag};
-  my $target = $target || $nick;
+  $target = $target || $nick;
   $text = Irssi::strip_codes($text);
 
   if (my($url) = $text =~ $URL_RE) {
git clone https://git.99rst.org/PROJECT