mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
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.
17 lines
932 B
Plaintext
17 lines
932 B
Plaintext
# 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}}
|