Files
clang-p2996/lld/test/ELF/color-diagnostics.test
Fangrui Song 6e4bbbfcc8 [ELF] Enforce double-dash form for --color-diagnostics/--rsp-quoting/--symbol-ordering-file
They are LLD-specific and by convention we enforce the double-dash form to avoid
collision with short options (e.g. weird `-c olor-diagnostics` interpretation in
GNU ld). They are rarely used and to the best of my investigation the undesired
single-dash forms are not used in the wild.
2022-01-06 01:02:14 -08:00

22 lines
933 B
Plaintext

# Windows command prompt doesn't support ANSI escape sequences.
# REQUIRES: shell
# RUN: not ld.lld -xyz --color-diagnostics /nosuchfile 2>&1 \
# RUN: | FileCheck -check-prefix=COLOR %s
# RUN: not ld.lld -xyz --color-diagnostics=always /nosuchfile 2>&1 \
# RUN: | FileCheck -check-prefix=COLOR %s
# COLOR: {{ld.lld: .\[0;31merror: .\[0munknown argument '-xyz'}}
# COLOR: {{ld.lld: .\[0;31merror: .\[0mcannot open /nosuchfile}}
# RUN: not ld.lld --color-diagnostics=foobar 2>&1 | FileCheck -check-prefix=ERR %s
# ERR: unknown option: --color-diagnostics=foobar
# RUN: not ld.lld /nosuchfile 2>&1 | FileCheck -check-prefix=NOCOLOR %s
# RUN: not ld.lld --color-diagnostics=never /nosuchfile 2>&1 \
# RUN: | FileCheck -check-prefix=NOCOLOR %s
# RUN: not ld.lld --color-diagnostics=always --no-color-diagnostics \
# RUN: /nosuchfile 2>&1 | FileCheck -check-prefix=NOCOLOR %s
# NOCOLOR: ld.lld: error: cannot open /nosuchfile