This small patch adds a test for functions & lldb commands with unicode characters in them.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for writing tests, it's really appreciated! FWIW, I think that you can just check in new tests without having to go through a full review (unless you do want feedback for it).
Having said that, would it be possible to maybe just extend the TestUnicodeSymbols.py test for the breakpoint part? You could just try setting a breakpoint and see if it gets resolved, this way the test doesn't have to start a new process (which is really expensive). There is also already a test for unicode variables (TestUnicodeInVariable.py)so this is redundant IIUC.
Ah, my grep/find skills clearly failed me :)
Yeah, those tests are exactly the same scenarios. However, if I understand correctly, don't they use the API? I wanted to add some coverage for the shell because I'm making changes to the Editline wrapper, and the existing tests don't appear to cover user input from the command line. But maybe I'm missing how those two tie together. Thanks.
It's quite common to use the lldbtest.TestBase.runCmd or lldbtest.TestBase.expect to test command line commands in the API tests. The latter has expect-like results checking which makes writing these checks easy. Even if you are testing a command-line command, driving to the point where you want to do the check is often easier with the API & the lldbutil helpers, so it's okay to intersperse these among the API uses.
There is also test/API/iohandler/unicode/TestUnicode.py which is starting a terminal and enters some unicode stuff :)
Thanks to both of you for this! I’m traveling for a few days but will be able to take a look towards the end of the week.
Agreed, it looks like there's plenty of test coverage for this scenario, so I'll revert this patch - sorry about that. I'm working on removing the wchar/char preprocessor logic in Editline.cpp so I'll verify the existing coverage before sending that for review. Thanks.