llvm-capstone/lldb/unittests/Utility/CMakeLists.txt
Raphael Isemann 2d42579886 Fix some crashes and deadlocks in FormatAnsiTerminalCodes
Summary:
This patch fixes a few problems with the FormatAnsiTerminalCodes function:

* It does an infinite loop on an unknown color value.
* It crashes when the color value is at the end of the string.
* It deletes the first character behind the color token.

Also added a few tests that reproduce those problems (and test some other corner cases).

Reviewers: davide, labath

Reviewed By: labath

Subscribers: labath, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D49307

llvm-svn: 337189
2018-07-16 16:38:30 +00:00

34 lines
620 B
CMake

add_lldb_unittest(UtilityTests
AnsiTerminalTest.cpp
ArgsTest.cpp
OptionsWithRawTest.cpp
ArchSpecTest.cpp
CleanUpTest.cpp
ConstStringTest.cpp
CompletionRequestTest.cpp
EnvironmentTest.cpp
FileSpecTest.cpp
JSONTest.cpp
LogTest.cpp
NameMatchesTest.cpp
StatusTest.cpp
StringExtractorTest.cpp
StructuredDataTest.cpp
TildeExpressionResolverTest.cpp
TimeoutTest.cpp
TimerTest.cpp
UriParserTest.cpp
UUIDTest.cpp
VASprintfTest.cpp
LINK_LIBS
lldbUtility
lldbUtilityHelpers
LINK_COMPONENTS
Support
)
add_unittest_inputs(UtilityTests
StructuredData-basic.json
)