1! Test the behaviors of -f{no-}color-diagnostics and -f{no}-diagnostic-colors 2! when emitting scanning diagnostics. 3! Windows command prompt doesn't support ANSI escape sequences. 4! REQUIRES: shell 5 6! RUN: not %flang %s -E -Werror -fcolor-diagnostics 2>&1 \ 7! RUN: | FileCheck %s --check-prefix=CHECK_CD 8! RUN: not %flang %s -E -Werror -fno-color-diagnostics 2>&1 \ 9! RUN: | FileCheck %s --check-prefix=CHECK_NCD 10! RUN: not %flang_fc1 -E -Werror %s -fcolor-diagnostics 2>&1 \ 11! RUN: | FileCheck %s --check-prefix=CHECK_CD 12 13! RUN: not %flang %s -E -Werror -fdiagnostics-color 2>&1 \ 14! RUN: | FileCheck %s --check-prefix=CHECK_CD 15! RUN: not %flang %s -E -Werror -fno-diagnostics-color 2>&1 \ 16! RUN: | FileCheck %s --check-prefix=CHECK_NCD 17 18! RUN: not %flang %s -E -Werror -fdiagnostics-color=always 2>&1 \ 19! RUN: | FileCheck %s --check-prefix=CHECK_CD 20! RUN: not %flang %s -E -Werror -fdiagnostics-color=never 2>&1 \ 21! RUN: | FileCheck %s --check-prefix=CHECK_NCD 22 23! RUN: not %flang_fc1 -E -Werror %s 2>&1 | FileCheck %s --check-prefix=CHECK_NCD 24 25! CHECK_CD: {{.*}}[0;1;35mwarning: {{.*}}[0mCharacter in fixed-form label field must be a digit 26 27! CHECK_NCD: warning: Character in fixed-form label field must be a digit 28 291 continue 30end 31