Skip to content

Commit 2fdf49d

Browse files
authored
[llvm-rc] Handle Windows line endings in tag-html test (#113000)
The tag-html.test has been failing for me and [in CI](https://buildkite.com/llvm-project/github-pull-requests/builds/111277#0192a122-c5c9-4e4e-bc5b-7532fec99ae4) if Git happens to decide to check out the baseline file with Windows line endings. This fix for this is to call `tr` to strip Windows newlines when copying the baselines files to the test output directory before embedding them.
1 parent f66bc4d commit 2fdf49d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/test/tools/llvm-rc/tag-html.test

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: rm -rf %t && mkdir %t && cd %t
2-
; RUN: cp %p/Inputs/webpage*.html .
2+
; Remove `\r` in case Git on Windows decided to checkout with Windows newlines.
3+
; RUN: tr -d '\r' <%p/Inputs/webpage1.html > ./webpage1.html
4+
; RUN: tr -d '\r' <%p/Inputs/webpage2.html > ./webpage2.html
35
; RUN: llvm-rc -no-preprocess /FO %t/tag-html.res -- %p/Inputs/tag-html.rc
46
; RUN: llvm-readobj %t/tag-html.res | FileCheck %s --check-prefix HTML
57

0 commit comments

Comments
 (0)