61 lines · plain
1# RUN: %clang_host -g %S/Inputs/main.c -o %t2 3# The file main.c is does not show up in search on Windows.4# UNSUPPORTED: system-windows5 6# Until we figure out the correct CHECK lines.7# UNSUPPORTED: system-darwin8 9# Checking simple regex search10 11# RUN: %lldb %t -b -o 'settings set use-color true' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK112# CHECK1: Name: {{.+}}31mma{{.+}}0min.c13 14# Checking complex regex searches15 16# RUN: %lldb %t -b -o 'settings set use-color true' -o 'image lookup -r -s main.c|foo' | FileCheck %s --check-prefix CHECK217# CHECK2: Name: {{.+}}31mmain.c{{.+}}0m18 19# RUN: %lldb %t -b -o 'settings set use-color true' -o 'image lookup -r -s m[abc]' | FileCheck %s --check-prefix CHECK320# CHECK3: Name: {{.+}}31mma{{.+}}0min.c21 22# Checking to ensure that no attempt is made to color anything when there are no matching symbols found23 24# RUN: %lldb %t -o 'settings set use-color true' -o 'image lookup -r -s IMPPATTERN123456' | FileCheck %s --check-prefix CHECK425# CHECK4-NOT: {{[0-9]+}} symbols match the regular expression26 27# Checking multiple matches on same symbol28 29# RUN: %lldb %t -b -o 'settings set use-color true' -o 'image lookup -r -s (ma|n)' | FileCheck %s --check-prefix CHECK530# CHECK5: Name: {{.+}}31mma{{.+}}0mi{{.+}}31mn{{.+}}0m.c31 32# Checking no colorization without regex search33 34# RUN: %lldb %t -b -o 'settings set use-color true' -o 'image lookup -s main' | FileCheck %s --check-prefix CHECK635# CHECK6: Summary: {{.+}}`main at main.c:36 37# Checking no colorization when use-color is false38 39# RUN: %lldb %t -b -o 'settings set use-color false' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK740# CHECK7: Name: main.c41 42# Checking for custom colors43 44# RUN: %lldb %t -b -o 'settings set use-color true' -o 'settings set show-regex-match-ansi-prefix ${ansi.fg.green}' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK845# CHECK8: Name: {{.+}}32mma{{.+}}0min.c46 47# Checking for functionality when there's prefix but no suffix48 49# RUN: %lldb %t -b -o 'settings set use-color true' -o 'settings set show-regex-match-ansi-prefix ${ansi.fg.red}' -o 'settings set show-regex-match-ansi-suffix ""' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK950# CHECK9: Name: {{.+}}31mmain.c51 52# Checking for functionality when there's suffix but no prefix53 54# RUN: %lldb %t -b -o 'settings set use-color true' -o 'settings set show-regex-match-ansi-prefix ""' -o 'settings set show-regex-match-ansi-suffix ${ansi.fg.red}' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK1055# CHECK10: Name: ma{{.+}}31min.c56 57# Checking for no colorization when there's neither suffix nor prefix58 59# RUN: %lldb %t -b -o 'settings set use-color true' -o 'settings set show-regex-match-ansi-prefix ""' -o 'settings set show-regex-match-ansi-suffix ""' -o 'image lookup -r -s ma' | FileCheck %s --check-prefix CHECK1160# CHECK11: Name: main.c61