Fix file help topic category casing differences appearing as duplicated categories

This commit is contained in:
Chiizujin 2024-03-30 17:34:55 +11:00
parent a1023ebc7e
commit 8357232dc0
2 changed files with 2 additions and 2 deletions

View file

@ -227,7 +227,7 @@ class FileHelpStorageHandler:
for dct in loaded_help_dicts:
key = dct.get("key").lower().strip()
category = dct.get("category", _DEFAULT_HELP_CATEGORY).strip()
category = dct.get("category", _DEFAULT_HELP_CATEGORY).lower().strip()
aliases = list(dct.get("aliases", []))
entrytext = dct.get("text", "")
locks = dct.get("locks", "")

View file

@ -138,5 +138,5 @@ class TestFileHelp(TestCase):
for inum, helpentry in enumerate(result):
self.assertEqual(HELP_ENTRY_DICTS[inum]["key"], helpentry.key)
self.assertEqual(HELP_ENTRY_DICTS[inum].get("aliases", []), helpentry.aliases)
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"], helpentry.help_category)
self.assertEqual(HELP_ENTRY_DICTS[inum]["category"].lower(), helpentry.help_category)
self.assertEqual(HELP_ENTRY_DICTS[inum]["text"], helpentry.entrytext)