[Lldb-commits] [lldb] 32c3561 - [lldb][Test] Escape | chars in enum tests
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu May 23 05:28:49 PDT 2024
Author: David Spickett
Date: 2024-05-23T12:28:26Z
New Revision: 32c3561d44aa792ef08d72b5a4c342c9965bc4c2
URL: https://github.com/llvm/llvm-project/commit/32c3561d44aa792ef08d72b5a4c342c9965bc4c2
DIFF: https://github.com/llvm/llvm-project/commit/32c3561d44aa792ef08d72b5a4c342c9965bc4c2.diff
LOG: [lldb][Test] Escape | chars in enum tests
| is a reserved character in regex.
Added:
Modified:
lldb/test/API/lang/c/enum_types/TestEnumTypes.py
Removed:
################################################################################
diff --git a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
index 33a846c50d7de..0015c8f478578 100644
--- a/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
+++ b/lldb/test/API/lang/c/enum_types/TestEnumTypes.py
@@ -26,7 +26,9 @@ def test_command_line(self):
self.expect("fr var b", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = B$"])
self.expect("fr var c", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = C$"])
self.expect("fr var ab", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = AB$"])
- self.expect("fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = A | C$"])
+ self.expect(
+ "fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = A \| C$"]
+ )
self.expect("fr var all", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = ALL$"])
# Test that an enum that doesn't match the heuristic we use in
# TypeSystemClang::DumpEnumValue, gets printed as a raw integer.
@@ -37,7 +39,7 @@ def test_command_line(self):
self.expect(
"expression (enum bitfield)nonsense",
DATA_TYPES_DISPLAYED_CORRECTLY,
- patterns=[" = B | C | 0x10$"],
+ patterns=[" = B \| C \| 0x10$"],
)
# Break inside the main.
More information about the lldb-commits
mailing list