fix: scope MCP configuration to Codex and stabilize Windows launchers
This commit is contained in:
1 parent
18d17da966
commit
c96935b47b
13 files changed
+290
-1125
No files matched your search
@@ -132,3 +132,23 @@ def test_packaging_rejects_uncommitted_changes_and_credentials(repository, tmp_p
|
||||
)
|
||||
with pytest.raises(ValueError, match="credential-free HTTPS"):
|
||||
module.package_source(root, tmp_path / "source.zip")
|
||||
|
||||
|
||||
def test_archive_checks_out_chinese_batch_with_crlf_and_clean_git(repository, tmp_path):
|
||||
root, _, _, _ = repository
|
||||
project_root = Path(__file__).resolve().parents[2]
|
||||
(root / ".gitattributes").write_bytes((project_root / ".gitattributes").read_bytes())
|
||||
# The Git blob uses LF; the archive must contain the CRLF working-tree form.
|
||||
content = (project_root / "start-cn.bat").read_bytes().replace(b"\r\n", b"\n")
|
||||
(root / "start-cn.bat").write_bytes(content)
|
||||
git(root, "add", "--", ".gitattributes", "start-cn.bat")
|
||||
git(root, "commit", "-m", "Windows launcher attributes")
|
||||
archive_path = tmp_path / "source.zip"
|
||||
module.package_source(root, archive_path)
|
||||
with zipfile.ZipFile(archive_path) as archive:
|
||||
packed = archive.read("artemis/start-cn.bat")
|
||||
assert b"\r\n" in packed
|
||||
assert b"\n" not in packed.replace(b"\r\n", b"")
|
||||
assert packed.decode("utf-8").startswith("@echo off\r\n")
|
||||
archive.extractall(tmp_path / "unpacked")
|
||||
assert git(tmp_path / "unpacked/artemis", "status", "--porcelain") == ""
|
||||
Reference in new issue
Block a user