Files
llvm/lldb/test/Shell/Commands/command-options.test
Charles Zablit 7345233fb6 [lldb] improve the heuristics for checking if a terminal supports Unicode (#171832)
This patch improves the way lldb checks if the terminal it's opened in
(if any) supports Unicode or not.

On POSIX systems, we check if `LANG` contains `UTF-8`.

On Windows, we always return `true` since we use the `WriteToConsoleW`
api.

This is a relanding of https://github.com/llvm/llvm-project/pull/168603.

The tests failed because the bots support Unicode but the tests expect
ASCII. To avoid different outputs depending on the environment the tests
are running in, this patch always force ASCII in the tests.
2025-12-12 15:07:08 +00:00

17 lines
932 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# RUN: echo quit | %lldb -O "log enable -x" \
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK1
# (lldb) log enable -x
# CHECK1:{{^ (\^|˄)(~|˜)}}
# CHECK1: {{^ (╰─ )?error: unknown or ambiguous option}}
# RUN: echo quit | %lldb -O " log enable -xxxxxxx" \
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK2
# (lldb) log enable -xxxxxxx
# CHECK2:{{^ (\^|˄)(~|˜)+}}
# CHECK2: {{^ (╰─ )?error: unknown or ambiguous option}}
# RUN: echo quit | %lldb -O "log enable dwarf all -f dwarf.log -x" \
# RUN: | FileCheck %s --strict-whitespace --check-prefix=CHECK3
# (lldb) log enable dwarf all -f dwarf.log -x
# CHECK3:{{^ (\^|˄)(~|˜)}}
# CHECK3: {{^ (╰─ )?error: unknown or ambiguous option}}