diff --git a/pqcli/lingo.py b/pqcli/lingo.py index 3573bd5..43461d3 100644 --- a/pqcli/lingo.py +++ b/pqcli/lingo.py @@ -97,7 +97,7 @@ def plural(subject: str) -> str: def indefinite(subject: str, qty: int) -> str: if qty == 1: - if subject.startswith(tuple("AEIOU?aeiou?")): + if subject.startswith(tuple("AEIOUÜaeiouü")): return "an " + subject return "a " + subject return str(qty) + " " + plural(subject) diff --git a/tests/test_lingo.py b/tests/test_lingo.py new file mode 100644 index 0000000..4d96f27 --- /dev/null +++ b/tests/test_lingo.py @@ -0,0 +1,9 @@ +from pqcli.lingo import indefinite, to_roman + + +def test_indefinite_article() -> None: + assert indefinite("Orc", 1) == "an Orc" + assert indefinite("Ürn", 1) == "an Ürn" + assert indefinite("über-Orc", 1) == "an über-Orc" + assert indefinite("?", 1) == "a ?" + assert indefinite("Rat", 1) == "a Rat"