diff options
-rw-r--r-- | lulua/data/layouts/ar-alramly.yaml | 2 | ||||
-rw-r--r-- | lulua/data/layouts/ar-khorshid.yaml | 2 | ||||
-rw-r--r-- | lulua/test_layout.py | 3 | ||||
-rw-r--r-- | lulua/writer.py | 2 |
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) |