32 lines · plain
1! Test the behaviors of -f{no-}color-diagnostics and -f{no}diagnostics-color2! when emitting semantic diagnostics.3! Windows command prompt doesn't support ANSI escape sequences.4! REQUIRES: system-linux5 6! RUN: not %flang %s -fcolor-diagnostics 2>&1 \7! RUN: | FileCheck %s --check-prefix=CHECK_CD8! RUN: not %flang %s -fno-color-diagnostics 2>&1 \9! RUN: | FileCheck %s --check-prefix=CHECK_NCD10! RUN: not %flang_fc1 %s -fcolor-diagnostics 2>&1 \11! RUN: | FileCheck %s --check-prefix=CHECK_CD12 13! RUN: not %flang %s -fdiagnostics-color 2>&1 \14! RUN: | FileCheck %s --check-prefix=CHECK_CD15! RUN: not %flang %s -fno-diagnostics-color 2>&1 \16! RUN: | FileCheck %s --check-prefix=CHECK_NCD17 18! RUN: not %flang %s -fdiagnostics-color=always 2>&1 \19! RUN: | FileCheck %s --check-prefix=CHECK_CD20! RUN: not %flang %s -fdiagnostics-color=never 2>&1 \21! RUN: | FileCheck %s --check-prefix=CHECK_NCD22 23! RUN: not %flang_fc1 %s 2>&1 | FileCheck %s --check-prefix=CHECK_NCD24 25! CHECK_CD: {{.*}}[0;1;31merror: {{.*}}[0mMust be a constant value26 27! CHECK_NCD: error: Must be a constant value28 29program m30 integer :: i = k31end32