[PATCH] D111072: [llvm-cxxfilt][NFC] Fix test for running in Windows cmd
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 4 09:35:46 PDT 2021
Orlando created this revision.
Orlando added reviewers: tmiasko, jhenderson, probinson, dblaikie.
Orlando added a project: LLVM.
Orlando requested review of this revision.
Herald added a subscriber: llvm-commits.
The test llvm\test\tools\llvm-cxxfilt\delimiters.test started failling when run
from cmd.exe on Windows after D110986 <https://reviews.llvm.org/D110986> which added a unicode character (⦙) to it.
Piping the unicode character in cmd.exe causes it to be converted to a '?'.
That causes the test to fail because the llvm-cxxfilt output becomes `Foo?Bar`
rather than the expected `Foo⦙Bar`.
Redirect the echo output to and from a temporary file to get around this
problem.
https://reviews.llvm.org/D111072
Files:
llvm/test/tools/llvm-cxxfilt/delimiters.test
Index: llvm/test/tools/llvm-cxxfilt/delimiters.test
===================================================================
--- llvm/test/tools/llvm-cxxfilt/delimiters.test
+++ llvm/test/tools/llvm-cxxfilt/delimiters.test
@@ -29,7 +29,8 @@
RUN: '_Z3Foo~,,' \
RUN: '_Z3Foo⦙_Z3Bar' \
RUN: '_Z3Foo,,_Z3Bar::_Z3Baz _Z3Foo,_Z3Bar:_Z3Baz' \
-RUN: '_Z3Foo$ ._Z3Foo' | llvm-cxxfilt -n | FileCheck %s
+RUN: '_Z3Foo$ ._Z3Foo' > %t
+RUN: llvm-cxxfilt -n < %t | FileCheck %s
CHECK: ,,Foo!
CHECK: Foo"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111072.376910.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211004/86f3f9f7/attachment.bin>
More information about the llvm-commits
mailing list