1*8ea2b417STarun Prabhu! Test the behaviors of -f{no-}color-diagnostics and -f{no-}diagnostics-color 2*8ea2b417STarun Prabhu! when emitting parsing diagnostics. 38df63a23SPeixin Qiao! Windows command prompt doesn't support ANSI escape sequences. 48df63a23SPeixin Qiao! REQUIRES: shell 58df63a23SPeixin Qiao 68df63a23SPeixin Qiao! RUN: not %flang %s -fcolor-diagnostics 2>&1 \ 78df63a23SPeixin Qiao! RUN: | FileCheck %s --check-prefix=CHECK_CD 8*8ea2b417STarun Prabhu! RUN: not %flang %s -fdiagnostics-color 2>&1 \ 9*8ea2b417STarun Prabhu! RUN: | FileCheck %s --check-prefix=CHECK_CD 10*8ea2b417STarun Prabhu! RUN: not %flang %s -fdiagnostics-color=always 2>&1 \ 11*8ea2b417STarun Prabhu! RUN: | FileCheck %s --check-prefix=CHECK_CD 12*8ea2b417STarun Prabhu 138df63a23SPeixin Qiao! RUN: not %flang %s -fno-color-diagnostics 2>&1 \ 148df63a23SPeixin Qiao! RUN: | FileCheck %s --check-prefix=CHECK_NCD 15*8ea2b417STarun Prabhu! RUN: not %flang %s -fno-diagnostics-color 2>&1 \ 16*8ea2b417STarun Prabhu! RUN: | FileCheck %s --check-prefix=CHECK_NCD 17*8ea2b417STarun Prabhu! RUN: not %flang %s -fdiagnostics-color=never 2>&1 \ 18*8ea2b417STarun Prabhu! RUN: | FileCheck %s --check-prefix=CHECK_NCD 19*8ea2b417STarun Prabhu 208df63a23SPeixin Qiao! RUN: not %flang_fc1 %s -fcolor-diagnostics 2>&1 \ 218df63a23SPeixin Qiao! RUN: | FileCheck %s --check-prefix=CHECK_CD 228df63a23SPeixin Qiao! RUN: not %flang_fc1 %s 2>&1 | FileCheck %s --check-prefix=CHECK_NCD 238df63a23SPeixin Qiao 2452601325SPeter Klausler! CHECK_CD: {{.*}}[0;1;31merror: {{.*}}[0mexpected end of statement 258df63a23SPeixin Qiao 2652601325SPeter Klausler! CHECK_NCD: error: expected end of statement 278df63a23SPeixin Qiao 288df63a23SPeixin Qiaoprogram m 298df63a23SPeixin Qiao integer :: i = 308df63a23SPeixin Qiaoend 31