summaryrefslogtreecommitdiff
path: root/lulua
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2019-10-02 17:19:49 +0200
committerLars-Dominik Braun <lars@6xq.net>2019-10-03 09:14:05 +0200
commit466a26f7ef64e9a8299e2b1c7704506c42681e5f (patch)
treef7395b531ab2365f32525b091a0ffde1068d5e2e /lulua
parent41a60920e413a513801ba186de86e2a7fd7ef9c3 (diff)
downloadlulua-466a26f7ef64e9a8299e2b1c7704506c42681e5f.tar.gz
lulua-466a26f7ef64e9a8299e2b1c7704506c42681e5f.tar.bz2
lulua-466a26f7ef64e9a8299e2b1c7704506c42681e5f.zip
layouts: Remove empty string production
Diffstat (limited to 'lulua')
-rw-r--r--lulua/data/layouts/ar-alramly.yaml2
-rw-r--r--lulua/data/layouts/ar-khorshid.yaml2
-rw-r--r--lulua/test_layout.py3
-rw-r--r--lulua/writer.py2
4 files changed, 5 insertions, 4 deletions
diff --git a/lulua/data/layouts/ar-alramly.yaml b/lulua/data/layouts/ar-alramly.yaml
index 8211d42..76802ae 100644
--- a/lulua/data/layouts/ar-alramly.yaml
+++ b/lulua/data/layouts/ar-alramly.yaml
@@ -43,7 +43,7 @@ layout:
Dr2: "\u0653" # madda (not sure)
Dr1: "ة"
- El1: ""
+ #El1: ""
El2: "ش"
El3: "س"
El4: "ذ"
diff --git a/lulua/data/layouts/ar-khorshid.yaml b/lulua/data/layouts/ar-khorshid.yaml
index d859e2d..6267765 100644
--- a/lulua/data/layouts/ar-khorshid.yaml
+++ b/lulua/data/layouts/ar-khorshid.yaml
@@ -44,7 +44,7 @@ layout:
Dr2: "ق"
#Dr1: ""
- El1: ""
+ #El1: ""
El2: "ب"
El3: "ح"
El4: "ت"
diff --git a/lulua/test_layout.py b/lulua/test_layout.py
index 53013ff..909b717 100644
--- a/lulua/test_layout.py
+++ b/lulua/test_layout.py
@@ -28,9 +28,10 @@ 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) """
+ """ Make sure layout text strings are atomic (i.e. not decomposeable) and not empty """
for btn, text in layout.buttons ():
assert isinstance (text, str)
+ assert text != '', (btn, )
for char in text:
d = unicodedata.decomposition (char)
# allow compat decompositions like … -> ...
diff --git a/lulua/writer.py b/lulua/writer.py
index 38dc01c..bbe1efb 100644
--- a/lulua/writer.py
+++ b/lulua/writer.py
@@ -186,7 +186,7 @@ class Writer:
try:
match, combinations = self.layout (buf)
- assert len (match) > 0, match
+ assert len (match) > 0, (match, combinations, buf)
comb = self.chooseCombination (combinations)