[libaudio-mpd-perl] 01/03: Add patch to make tests work with mpd >= 0.19.

gregor herrmann gregoa at debian.org
Wed Nov 12 20:06:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libaudio-mpd-perl.

commit 3b3d4f3c65d1e6f9973078df6af3795dada706be
Author: gregor herrmann <gregoa at debian.org>
Date:   Wed Nov 12 20:50:29 2014 +0100

    Add patch to make tests work with mpd >= 0.19.
    
    One tests checks for the accumulated playtime of the audio samples.
    Test::Corpus::Audio::MPD contains 5 tracks just over 1.8 seconds each.
    mpd < 0.19 rounded each track up to 2 seconds then added the lengths
    in seconds to get 10s, but mpd >= 0.19 adds up the lengths in ms and then
    rounds it down to 9s.
    
    Change this test to look for >= 9 and <= 10 seconds.
    
    Thanks: Simon McVittie for the patch.
    Closes: #768692
---
 debian/patches/mpd-0.19.patch | 34 ++++++++++++++++++++++++++++++++++
 debian/patches/series         |  1 +
 2 files changed, 35 insertions(+)

diff --git a/debian/patches/mpd-0.19.patch b/debian/patches/mpd-0.19.patch
new file mode 100644
index 0000000..288a9d5
--- /dev/null
+++ b/debian/patches/mpd-0.19.patch
@@ -0,0 +1,34 @@
+Description: Adjust test to mpd >= 0.19
+ Test::Corpus::Audio::MPD contains 5 tracks just over 1.8 seconds each.
+ mpd < 0.19 rounded each track up to 2 seconds then added the lengths
+ in seconds to get 10s, but mpd >= 0.19 adds up the lengths in ms and then
+ rounds it down to 9s.
+Bug-Debian: https://bugs.debian.org/768692
+Origin: vendor
+Author: Simon McVittie <smcv at debian.org>
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-11-12
+Forwarded: https://rt.cpan.org/Ticket/Display.html?id=100300
+Bug: https://rt.cpan.org/Ticket/Display.html?id=100300
+
+--- a/t/24-info.t
++++ b/t/24-info.t
+@@ -18,7 +18,7 @@
+ eval 'use Test::Corpus::Audio::MPD';
+ plan skip_all => $@ if $@ =~ s/\n+Compilation failed.*//s;
+ 
+-plan tests => 16;
++plan tests => 17;
+ my $mpd = Audio::MPD->new;
+ my $song;
+ 
+@@ -34,7 +34,8 @@
+ is( $stats->albums,       1, 'one album in the database' );
+ is( $stats->songs,        5, '5 songs in the database' );
+ is( $stats->playtime,     0, 'already played 0 seconds' );
+-is( $stats->db_playtime, 10, '10 seconds worth of music in the db' );
++cmp_ok( $stats->db_playtime, '>=', 9, '>= 9 seconds worth of music in the db' );
++cmp_ok( $stats->db_playtime, '<=', 10, '<= 10 seconds worth of music in the db' );
+ isnt( $stats->uptime, undef, 'uptime is defined' );
+ isnt( $stats->db_update,  0, 'database has been updated' );
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..9e70dcb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+mpd-0.19.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libaudio-mpd-perl.git



More information about the Pkg-perl-cvs-commits mailing list