Debian Codegraph @

flang/test/Driver/color-diagnostics.f90

raw
1 ! Test the behaviors of -f{no-}color-diagnostics.
2 ! Windows command prompt doesn't support ANSI escape sequences.
3 ! REQUIRES: shell
4
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
14
15 ! CHECK_CD: {{.*}}[0;1;31merror: {{.*}}[0m{{.*}}[1mSemantic errors in {{.*}}color-diagnostics.f90{{.*}}[0m
16
17 ! CHECK_NCD: Semantic errors in {{.*}}color-diagnostics.f90
18
19 ! UNSUPPORTED_OPTION: error: unknown argument: '-fno-color-diagnostics'
20
21 program m
22 integer :: i = k
23 end