Files
clang-p2996/lld/test/MachO/color-diagnostics.test
Shoaib Meenai 264d3b6d4e [MachO] Use error instead of fatal for missing -arch
`fatal` should only be used for malformed inputs according to
ErrorHandler.h; `error` is more appropriate for missing arguments,
accompanied by a check to bail out early in case of the error. Some
tests need to be adjusted accordingly.

Makes `lld/test/MachO/arch.s` pass with `LLD_IN_TEST=2`.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D112879
2021-10-31 16:31:21 -07:00

21 lines
840 B
Plaintext

# Windows command prompt doesn't support ANSI escape sequences.
# REQUIRES: shell
# RUN: not %lld --color-diagnostics /nosuchfile 2>&1 \
# RUN: | FileCheck -check-prefix=COLOR %s
# RUN: not %lld --color-diagnostics=always /nosuchfile 2>&1 \
# RUN: | FileCheck -check-prefix=COLOR %s
# 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