migrate: own text/UTF-8 sources and carry their baseline assertions #2

Merged
cflmy merged 2 commits from migration/stdlib-text into main 2026-11-26 23:58:08 +08:00
Showing only changes of commit c2a7d327e5 - Show all commits
+3 -2
View File
@@ -80,11 +80,12 @@ def _run_case(case: dict, case_path: Path, binary: str, bundle: Path) -> None:
env = os.environ.copy()
env["MARQDO_STDLIB_DIR"] = str(bundle)
for key, value in case.get("env", {}).items():
env[key] = str(value)
env[key] = str(value).replace("$MARQDO_BIN", binary)
version = subprocess.run(
[binary, "--version"], capture_output=True, text=True, check=True
).stdout
command = [binary, "run", str(source), *case.get("args", []), "--output", "json"]
args = [str(arg).replace("$MARQDO_BIN", binary) for arg in case.get("args", [])]
command = [binary, "run", str(source), *args, "--output", "json"]
result = subprocess.run(
command,
cwd=REPO,