llvm-project/lld/test/MachO/color-diagnostics.test
Nico Weber 11b7625833 [lld/mac] Implement basic typo correction for flags
Also use "unknown flag 'flag'" instead of "unknown flag: flag" for
consistency with the other ports.

Differential Revision: https://reviews.llvm.org/D91970
2020-11-24 11:33:39 -05:00

22 lines
912 B
Plaintext

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