test: normalize CRLF in the windows.ps1 handoff guard reader
.gitattributes forces eol=crlf for *.ps1, so CI checkouts hand the test CRLF content and the SelfTest-strip regex anchors never matched; it went unnoticed while the stripped fixture blocks contained no offenders.
This commit is contained in:
@@ -37,7 +37,10 @@ WINDOWS_PS1 = REPO_ROOT / "scripts" / "desktop-update" / "windows.ps1"
|
||||
|
||||
|
||||
def _read() -> str:
|
||||
return WINDOWS_PS1.read_text(encoding="utf-8")
|
||||
# windows.ps1 is eol=crlf in .gitattributes, so checkouts materialize
|
||||
# CRLF on disk (CI included). Normalize so the SelfTest-block strip's
|
||||
# `\n}\n` anchors match regardless of the working-copy line endings.
|
||||
return WINDOWS_PS1.read_text(encoding="utf-8").replace("\r\n", "\n")
|
||||
|
||||
|
||||
def _handoff_source() -> str:
|
||||
|
||||
Reference in New Issue
Block a user