brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 6c5d160 Raw
18 lines · c
1// RUN: env NO_COLOR=1 %clang -### %s 2>&1 | FileCheck --check-prefix=NO-COLOR %s2// RUN: env NO_COLOR=1 %clang -fcolor-diagnostics -### %s 2>&1 | FileCheck --check-prefix=COLOR %s3// RUN: env NO_COLOR=1 %clang -fdiagnostics-color=auto -### %s 2>&1 | FileCheck --check-prefix=NO-COLOR %s4// RUN: env NO_COLOR=1 %clang -fdiagnostics-color=always -### %s 2>&1 | FileCheck --check-prefix=COLOR %s5// RUN: env NO_COLOR=1 %clang -fdiagnostics-color=never -### %s 2>&1 | FileCheck --check-prefix=NO-COLOR %s6 7// Note, the value of the environment variable does not matter, only that it is defined and not empty.8// RUN: env NO_COLOR=0 %clang -### %s 2>&1 | FileCheck --check-prefix=NO-COLOR %s9// Note, an empty value means we automatically decide whether to enable colors or not, and lit tests10// are not run in a PTY, so colors are disabled by default. There is no easy way for us to test this11// configuration where auto enables colors.12// RUN: env NO_COLOR= %clang -### %s 2>&1 | FileCheck --check-prefix=NO-COLOR %s13 14int main(void) {}15 16// COLOR: -fcolor-diagnostics17// NO-COLOR-NOT: -fcolor-diagnostics18