media-libs/libmygpo-qt: fix test failure
authorAlexander Golubev <fatzer2@gmail.com>
Tue, 20 Sep 2016 15:08:21 +0000 (18:08 +0300)
committerLars Wendler <polynomial-c@gentoo.org>
Mon, 26 Dec 2016 16:09:02 +0000 (17:09 +0100)
Closes: https://github.com/gentoo/gentoo/pull/2350

media-libs/libmygpo-qt/files/libmygpo-qt-1.0.8-fix-JsonCreatorTest-failure.patch [new file with mode: 0644]
media-libs/libmygpo-qt/libmygpo-qt-1.0.8.ebuild
media-libs/libmygpo-qt/libmygpo-qt-1.0.9.ebuild

diff --git a/media-libs/libmygpo-qt/files/libmygpo-qt-1.0.8-fix-JsonCreatorTest-failure.patch b/media-libs/libmygpo-qt/files/libmygpo-qt-1.0.8-fix-JsonCreatorTest-failure.patch
new file mode 100644 (file)
index 0000000..0d3dd76
--- /dev/null
@@ -0,0 +1,26 @@
+Fix the failure of JsonCreatorTest due to mistake in expected string.
+The patch is submitted to upstream: https://github.com/gpodder/libmygpo-qt/pull/10
+
+From: Golubev Alexander <fatzer2@gmail.com>
+Date: Tue, 20 Sep 2016 15:33:30 +0400
+
+---
+ tests/JsonCreatorTest.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/JsonCreatorTest.cpp b/tests/JsonCreatorTest.cpp
+index b15b006..feb03d5 100644
+--- a/tests/JsonCreatorTest.cpp
++++ b/tests/JsonCreatorTest.cpp
+@@ -133,7 +133,7 @@ void JsonCreatorTest::testEpisodeActionListToJSON()
+   output = JsonCreator::episodeActionListToJSON(episodeActions);
+   QString outString2 = QString::fromLatin1( output ).replace( QLatin1String(" "), QLatin1String("") );
+-  QString expected2( QLatin1String( "[{\"action\":\"download\",\"device\":\"device1\",\"episode\":\"http://episode.url\",\"podcast\":\"http://podcast.url\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"delete\",\"device\":\"device3\",\"episode\":\"http://episode2.url\",\"podcast\":\"http://podcast2.url\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"new\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1920-01-01T12:01:02\" },{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":123,\"started\":10,\"timestamp\":\"1998-01-01T00:01:02\",\"total\":321},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":10,\"timestamp\":\"1998-01-01T00:01:02\"}]" ) );
++  QString expected2( QLatin1String( "[{\"action\":\"download\",\"device\":\"device1\",\"episode\":\"http://episode.url\",\"podcast\":\"http://podcast.url\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"delete\",\"device\":\"device3\",\"episode\":\"http://episode2.url\",\"podcast\":\"http://podcast2.url\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"new\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1998-01-01T00:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"timestamp\":\"1920-01-01T12:01:02\"},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":123,\"started\":10,\"timestamp\":\"1998-01-01T00:01:02\",\"total\":321},{\"action\":\"play\",\"device\":\"foodev\",\"episode\":\"http://www.podtrac.com\",\"podcast\":\"http://leo.am\",\"position\":10,\"timestamp\":\"1998-01-01T00:01:02\"}]" ) );
+   QCOMPARE(outString2, expected2 );
+ }
+-- 
+2.7.4
+
index 55d0b4a7505fb9e81b794afe9ad6aef65b959ce9..cbe9687ff81238ad885f480c382fb74f85eb51c4 100644 (file)
@@ -29,6 +29,7 @@ DEPEND="${RDEPEND}
        test? ( dev-qt/qttest:4 )"
 
 DOCS=( AUTHORS README )
+PATCHES=( ${FILESDIR}/${P}-fix-JsonCreatorTest-failure.patch )
 
 src_prepare() {
        cmake-utils_src_prepare
index af69ab2873719a6881820a926612c98f36b79a0f..cf7ac6c6fe1ea681ee34bee95ecc8cb3a63b6dc7 100644 (file)
@@ -29,6 +29,7 @@ DEPEND="${RDEPEND}
        test? ( dev-qt/qttest:4 )"
 
 DOCS=( AUTHORS README )
+PATCHES=( ${FILESDIR}/${PN}-1.0.8-fix-JsonCreatorTest-failure.patch )
 
 src_configure() {
        local mycmakeargs=(