From 5d3be605dc2992a2db74c7f457fbef12bbcae2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Tue, 24 Nov 2020 17:32:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=82=D0=B5=D1=81=D1=82=20=D0=B4=D0=BB=D1=8F=20=D1=84?= =?UTF-8?q?=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B0=20KDE=20=D1=81=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B0=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=D0=BC=20xa0=20=D1=81=D0=B8=D0=BC=D0=B2=D0=BE=D0=BB=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE=20=D0=BF=D1=80=D0=BE=D0=B1?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/templates/format/test_kde.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/templates/format/test_kde.py b/tests/templates/format/test_kde.py index 63ab7c7..75f8e91 100644 --- a/tests/templates/format/test_kde.py +++ b/tests/templates/format/test_kde.py @@ -388,3 +388,25 @@ pluginWhiteList=shell,bookmarks,locations template_object = KDEFormat(template_text, '/path/to/template') original_object.join_template(template_object) assert original_object.document_text == join_result + + def test_with_xa0_symbol_in_source_document(self): + original_text = '''[Test] +Name[pl]=Przechowalnia certyfikatów i\xa0kluczy +Comment[fr]=Trousseau de clés de GNOME\xa0: composant PKCS#11 +NoShow=true +''' + + template_text = '''[Test] +!NoShow= +''' + + join_result = '''[Test] +Name[pl]=Przechowalnia certyfikatów i\xa0kluczy +Comment[fr]=Trousseau de clés de GNOME\xa0: composant PKCS#11 + +''' + + original_object = KDEFormat(original_text, '/path/to/template') + template_object = KDEFormat(template_text, '/path/to/template') + original_object.join_template(template_object) + assert original_object.document_text == join_result