1 ! Test the behaviors of -f{no-}color-diagnostics.
2 ! Windows command prompt doesn't support ANSI escape sequences.
5 ! RUN: not %flang %s -fcolor-diagnostics 2>&1 \
6 ! RUN: | FileCheck %s --check-prefix=CHECK_CD
7 ! RUN: not %flang %s -fno-color-diagnostics 2>&1 \
8 ! RUN: | FileCheck %s --check-prefix=CHECK_NCD
9 ! RUN: not %flang_fc1 %s -fcolor-diagnostics 2>&1 \
10 ! RUN: | FileCheck %s --check-prefix=CHECK_CD
11 ! RUN: not %flang_fc1 %s -fno-color-diagnostics 2>&1 \
12 ! RUN: | FileCheck %s --check-prefix=UNSUPPORTED_OPTION
13 ! RUN: not %flang_fc1 %s 2>&1 | FileCheck %s --check-prefix=CHECK_NCD
15 ! CHECK_CD: {{.*}}[0;1;31merror: {{.*}}[0m{{.*}}[1mSemantic errors in {{.*}}color-diagnostics.f90{{.*}}[0m
17 ! CHECK_NCD: Semantic errors in {{.*}}color-diagnostics.f90
19 ! UNSUPPORTED_OPTION: error: unknown argument: '-fno-color-diagnostics'