summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2017-09-16 20:23:10 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2017-09-16 22:03:02 +0200
commit4f5b0990ff580f81ceef701a743d5a780ec3b891 (patch)
treec4e0e5a99009720053c4196471e0cc8192a32788
parentf3c1c642d37d8799889038bcbd051206bba9e3cb (diff)
downloaddesktop-4f5b0990ff580f81ceef701a743d5a780ec3b891.tar.gz
desktop-4f5b0990ff580f81ceef701a743d5a780ec3b891.tar.xz
telepathy-idle: Fix test
-rw-r--r--packages/net-im/telepathy-idle/files/telepathy-idle-Fix-invalid-utf8-test.patch31
-rw-r--r--packages/net-im/telepathy-idle/telepathy-idle-0.2.0-r1.exheres-04
2 files changed, 35 insertions, 0 deletions
diff --git a/packages/net-im/telepathy-idle/files/telepathy-idle-Fix-invalid-utf8-test.patch b/packages/net-im/telepathy-idle/files/telepathy-idle-Fix-invalid-utf8-test.patch
new file mode 100644
index 0000000..21877ba
--- /dev/null
+++ b/packages/net-im/telepathy-idle/files/telepathy-idle-Fix-invalid-utf8-test.patch
@@ -0,0 +1,31 @@
+Upstream: Admittedly I'm not sure if this defeats the purpose of the test.
+ Anyway, submitted and tracked at
+ https://bugs.freedesktop.org/show_bug.cgi?id=102807
+
+From 0d88b7eb83e7f52986dedc6bdcd56b1740b0b0c9 Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Sat, 16 Sep 2017 20:45:38 +0200
+Subject: [PATCH] Fix invalid-utf8 test
+
+Fails with "UnicodeDecodeError: 'ascii' codec can't decode byte 0xed
+in position 8: ordinal not in range(128)" otherwise.
+---
+ tests/twisted/messages/invalid-utf8.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/twisted/messages/invalid-utf8.py b/tests/twisted/messages/invalid-utf8.py
+index a48c2f4..335ac4b 100644
+--- a/tests/twisted/messages/invalid-utf8.py
++++ b/tests/twisted/messages/invalid-utf8.py
+@@ -33,7 +33,7 @@ def test_with_message(q, stream, parts):
+
+ # Idle's default character set is UTF-8. We send it a message which is
+ # basically UTF-8, except that one of its code points is invalid.
+- stream.sendMessage('PRIVMSG', stream.nick, ':%s' % invalid_utf8,
++ stream.sendMessage('PRIVMSG', stream.nick, ':%s' % invalid_utf8.decode("utf8"),
+ prefix='remoteuser')
+
+ # Idle should signal that *something* was received. If it hasn't validated
+--
+2.14.1
+
diff --git a/packages/net-im/telepathy-idle/telepathy-idle-0.2.0-r1.exheres-0 b/packages/net-im/telepathy-idle/telepathy-idle-0.2.0-r1.exheres-0
index b3ea9bf..a2a7ffa 100644
--- a/packages/net-im/telepathy-idle/telepathy-idle-0.2.0-r1.exheres-0
+++ b/packages/net-im/telepathy-idle/telepathy-idle-0.2.0-r1.exheres-0
@@ -29,7 +29,11 @@ DEPENDENCIES="
net-twisted/Twisted
"
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PN}-Fix-invalid-utf8-test.patch )
+
src_prepare() {
+ default
+
# Fails since 0.1.16 and hasn't been picked up since october 2016,
# upstream is busy working on 1.0
edo sed -e 's:connect/server-quit-ignore.py::' \