From 606d80386521d0d257618ffa34f2c4562fe3f1b4 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 29 Sep 2019 08:40:55 +0200 Subject: layouts: Use decomposed unicode sequence --- lulua/data/layouts/ar-alramly.yaml | 2 +- lulua/data/layouts/ar-khorshid.yaml | 6 +++--- lulua/test_layout.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lulua/data/layouts/ar-alramly.yaml b/lulua/data/layouts/ar-alramly.yaml index 05f5fad..8211d42 100644 --- a/lulua/data/layouts/ar-alramly.yaml +++ b/lulua/data/layouts/ar-alramly.yaml @@ -12,7 +12,7 @@ layout: Br5: "٨" Br4: "٩" Br3: "." - Br2: "ئ" + Br2: "\u064A\u0654" # composed: ئ Cl1: "ض" Cl2: "ص" diff --git a/lulua/data/layouts/ar-khorshid.yaml b/lulua/data/layouts/ar-khorshid.yaml index 04a457e..d859e2d 100644 --- a/lulua/data/layouts/ar-khorshid.yaml +++ b/lulua/data/layouts/ar-khorshid.yaml @@ -16,11 +16,11 @@ layout: Br1: "=" Cl1: "ف" - Cl2: "ئ" + Cl2: "\u064A\u0654" # composed: ئ Cl3: "ش" - Cl4: "لا" + Cl4: "لا" # composed: ﻻ Cl5: "ط" - Cr7: "ؤ" + Cr7: "\u0648\u0654" # composed: ؤ Cr6: "ث" Cr5: "س" Cr4: "ص" diff --git a/lulua/test_layout.py b/lulua/test_layout.py index 5c8bb7f..53013ff 100644 --- a/lulua/test_layout.py +++ b/lulua/test_layout.py @@ -29,13 +29,13 @@ from .keyboard import defaultKeyboards @pytest.mark.parametrize("layout", defaultLayouts, ids=[l.name for l in defaultLayouts]) def test_atomic (layout): """ Make sure layout text strings are atomic (i.e. not decomposeable) """ - for _, text in layout.buttons (): + for btn, text in layout.buttons (): assert isinstance (text, str) for char in text: d = unicodedata.decomposition (char) # allow compat decompositions like … -> ... if not d.startswith (' ') and not d.startswith (' ') and not d.startswith (' ') and not d.startswith (' '): - assert d == '', char + assert d == '', (char, btn) @pytest.mark.parametrize("layout", defaultLayouts, ids=[l.name for l in defaultLayouts]) def test_genericlayout_len (layout): -- cgit v1.2.3