23 lines · plain
1; Create a case that produces a simple diagnostic.2; RUN: echo foo > %t.in3; CHECK: bar4 5; Run without and with -color. In the former case, FileCheck should suppress6; color in its diagnostics because stderr is a file.7; RUN: %ProtectFileCheckOutput not FileCheck %s < %t.in 2> %t.no-color8; RUN: %ProtectFileCheckOutput not FileCheck -color %s < %t.in 2> %t.color9 10; Check whether color was produced.11; RUN: FileCheck -check-prefix NO-COLOR %s < %t.no-color12; RUN: FileCheck -check-prefix COLOR %s < %t.color13 14; Make sure our NO-COLOR and COLOR patterns are sane: they don't match the15; opposite cases.16; RUN: not FileCheck -check-prefix COLOR %s < %t.no-color17; RUN: not FileCheck -check-prefix NO-COLOR %s < %t.color18 19; I don't know of a good way to check for ANSI color codes, so just make sure20; some new characters show up where those codes should appear.21; NO-COLOR: : error: CHECK: expected string not found in input22; COLOR: : {{.+}}error: {{.+}}CHECK: expected string not found in input23