Add test cases in testCheckLegalKey #9931
Conversation
|
Thanks for your interest in JabRef and for adding the test case. We would love to have a patch for the CitationKeyGenerator so the test wont fail anymore. |
|
Sure, I just add a patch to UnicodeToReadableCharMap and all the tests pass in my local machine. However, since we have to manually add all the special characters in UnicodeToReadableCharMap one by one, if a user enter a name that contains characters not in map in the future, this bug will show up again. Maybe we can come up with a clever way to include all the accents' unicode in the future |
|
Some time ago, @koppor and me were thinking of a replacement for the current Unicode mapping table, but we did not see a systematic in the Unicode table that would avoid mapping each single edge case. But maybe you see a solution? Maybe by checking a range of the index in the Unicode table? |
|
I would appreciate it if you could try the icu4j transliteration methods: https://unicode-org.github.io/icu/userguide/transforms/general/ |
|
I think for the moment we can merge this and create a follow up issue investigating some alternatives |
Add three test cases for method testCheckLegalKey in org.jabref.logic.citationkeypattern.CitationKeyGeneratorTest.java


Related to the edge cases in #9799 disscussion
Two of the tests fail because they are edge cases.
To solve this, we need to put more characters in UnicodeToReadableCharMap