Skip to content

Commit 32c3561

Browse files
committed
[lldb][Test] Escape | chars in enum tests
| is a reserved character in regex.
1 parent 01f143d commit 32c3561

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/test/API/lang/c/enum_types/TestEnumTypes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def test_command_line(self):
2626
self.expect("fr var b", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = B$"])
2727
self.expect("fr var c", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = C$"])
2828
self.expect("fr var ab", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = AB$"])
29-
self.expect("fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = A | C$"])
29+
self.expect(
30+
"fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = A \| C$"]
31+
)
3032
self.expect("fr var all", DATA_TYPES_DISPLAYED_CORRECTLY, patterns=[" = ALL$"])
3133
# Test that an enum that doesn't match the heuristic we use in
3234
# TypeSystemClang::DumpEnumValue, gets printed as a raw integer.
@@ -37,7 +39,7 @@ def test_command_line(self):
3739
self.expect(
3840
"expression (enum bitfield)nonsense",
3941
DATA_TYPES_DISPLAYED_CORRECTLY,
40-
patterns=[" = B | C | 0x10$"],
42+
patterns=[" = B \| C \| 0x10$"],
4143
)
4244

4345
# Break inside the main.

0 commit comments

Comments
 (0)