[Symbolize] Fix llvm-symbolizer --filter-markup test on Windows.
authorDaniel Thornburgh <dthorn@google.com>
Mon, 27 Jun 2022 18:13:52 +0000 (11:13 -0700)
committerDaniel Thornburgh <dthorn@google.com>
Mon, 27 Jun 2022 18:16:15 +0000 (11:16 -0700)
The tests use in-band ANSI color codes, while the Windows cmd console
uses an out-of-band interface for color.

llvm/test/tools/llvm-symbolizer/filter-markup-color.test [new file with mode: 0644]
llvm/test/tools/llvm-symbolizer/filter-markup.test

diff --git a/llvm/test/tools/llvm-symbolizer/filter-markup-color.test b/llvm/test/tools/llvm-symbolizer/filter-markup-color.test
new file mode 100644 (file)
index 0000000..c960baf
--- /dev/null
@@ -0,0 +1,21 @@
+UNSUPPORTED: system-windows
+
+RUN: echo -e "a{{{symbol:foo}}}b\n{{{symbol:bar}}}\n" > %t.input
+
+RUN: llvm-symbolizer --filter-markup --color < %t.input > %t.color
+RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.color --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=auto < %t.input > %t.autocolor
+RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.autocolor --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=never < %t.input > %t.nevercolor
+RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nevercolor --match-full-lines --implicit-check-not {{.}}
+
+RUN: llvm-symbolizer --filter-markup --color=always < %t.input > %t.alwayscolor
+RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.alwayscolor --match-full-lines --implicit-check-not {{.}}
+
+NOCOLOR: afoob
+NOCOLOR: bar
+
+COLOR: a{{.}}[0;34mfoo{{.}}[0mb
+COLOR: {{.}}[0;34mbar{{.}}[0m
index 4610994b40ac1ade0a7d5678507fcd8a381fdf8f..be65adbc0311041b9c3718fcbe6b069fd73b8e8b 100644 (file)
@@ -1,21 +1,6 @@
 RUN: echo -e "a{{{symbol:foo}}}b\n{{{symbol:bar}}}\n" > %t.input
-RUN: llvm-symbolizer --filter-markup < %t.input > %t.nocolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nocolor --match-full-lines --implicit-check-not {{.}}
+RUN: llvm-symbolizer --filter-markup < %t.input > %t.output
+RUN: FileCheck %s --input-file=%t.output --match-full-lines --implicit-check-not {{.}}
 
-NOCOLOR: afoob
-NOCOLOR: bar
-
-RUN: llvm-symbolizer --filter-markup --color < %t.input > %t.color
-RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.color --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=auto < %t.input > %t.autocolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.autocolor --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=never < %t.input > %t.nevercolor
-RUN: FileCheck %s --check-prefix=NOCOLOR --input-file=%t.nevercolor --match-full-lines --implicit-check-not {{.}}
-
-RUN: llvm-symbolizer --filter-markup --color=always < %t.input > %t.alwayscolor
-RUN: FileCheck %s --check-prefix=COLOR --input-file=%t.alwayscolor --match-full-lines --implicit-check-not {{.}}
-
-COLOR: a{{.}}[0;34mfoo{{.}}[0mb
-COLOR: {{.}}[0;34mbar{{.}}[0m
+CHECK: afoob
+CHECK: bar