Browse Source

Fix some cap and test configurations.

scossu 1 year ago
parent
commit
4c1e5c1c3a
2 changed files with 6 additions and 3 deletions
  1. 5 3
      scriptshifter/tables/__init__.py
  2. 1 0
      tests/data/cap_base1.yml

+ 5 - 3
scriptshifter/tables/__init__.py

@@ -135,9 +135,11 @@ def load_table(tname):
             }
             # Merge and/or remove double cap rules.
             tdata["script_to_roman"]["double_cap"] = tuple((
-                set(parent_tdata["script_to_roman"].get("double_cap", {})) |
-                set(tdata["script_to_roman"].get("double_cap", {}))
-            ) - set(tdata["script_to_roman"].get("no_double_cap", {})))
+                set(parent_tdata.get(
+                    "script_to_roman", {}
+                ).get("double_cap", set())) |
+                set(tdata["script_to_roman"].get("double_cap", set()))
+            ) - set(tdata["script_to_roman"].get("no_double_cap", set())))
         if "no_double_cap" in tdata["script_to_roman"]:
             del tdata["script_to_roman"]["no_double_cap"]
 

+ 1 - 0
tests/data/cap_base1.yml

@@ -8,6 +8,7 @@ script_to_roman:
     - "z\uFE20h\uFE21"
   map:
     # From Belarusian
+    "\u0432": "v"
     "\u0433": "h"
     "\u0436": "z\uFE20h\uFE21" # ж → z︠h︡
     "\u0437": "z"