diff --git a/llvm/test/tools/llvm-rc/tag-html.test b/llvm/test/tools/llvm-rc/tag-html.test
index 3620fe954ba1c..e0fe2e659dd0e 100644
--- a/llvm/test/tools/llvm-rc/tag-html.test
+++ b/llvm/test/tools/llvm-rc/tag-html.test
@@ -1,5 +1,7 @@
; RUN: rm -rf %t && mkdir %t && cd %t
-; RUN: cp %p/Inputs/webpage*.html .
+; Remove `\r` in case Git on Windows decided to checkout with Windows newlines.
+; RUN: tr -d '\r' <%p/Inputs/webpage1.html > ./webpage1.html
+; RUN: tr -d '\r' <%p/Inputs/webpage2.html > ./webpage2.html
; RUN: llvm-rc -no-preprocess /FO %t/tag-html.res -- %p/Inputs/tag-html.rc
; RUN: llvm-readobj %t/tag-html.res | FileCheck %s --check-prefix HTML