| 1 |
! Test that flang-new forwards -f{no-}color-diagnostics options to |
| 2 |
! flang-new -fc1 as expected. |
| 3 |
|
| 4 |
! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fcolor-diagnostics \ |
| 5 |
! RUN: | FileCheck %s --check-prefix=CHECK-CD |
| 6 |
! CHECK-CD: "-fc1"{{.*}} "-fcolor-diagnostics" |
| 7 |
|
| 8 |
! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 -fno-color-diagnostics \ |
| 9 |
! RUN: | FileCheck %s --check-prefix=CHECK-NCD |
| 10 |
! CHECK-NCD-NOT: "-fc1"{{.*}} "-fcolor-diagnostics" |
| 11 |
|
| 12 |
! Check that the last flag wins. |
| 13 |
! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ |
| 14 |
! RUN: -fno-color-diagnostics -fcolor-diagnostics \ |
| 15 |
! RUN: | FileCheck %s --check-prefix=CHECK-NCD_CD_S |
| 16 |
! CHECK-NCD_CD_S: "-fc1"{{.*}} "-fcolor-diagnostics" |
| 17 |
|
| 18 |
! RUN: %flang -fsyntax-only -### %s -o %t 2>&1 \ |
| 19 |
! RUN: -fcolor-diagnostics -fno-color-diagnostics \ |
| 20 |
! RUN: | FileCheck %s --check-prefix=CHECK-CD_NCD_S |
| 21 |
! CHECK-CD_NCD_S-NOT: "-fc1"{{.*}} "-fcolor-diagnostics" |