tools tests: the golden compare replaces only the whole engine name (#973)

On Linux the engine is called strata, which also rewrote strata-<model>.log and made
every Enter-for-every-question case differ from the baseline.
This commit is contained in:
Niko1221 committed 2026-10-05 22:46:53 +02:00
1 parent d1ec32b4ff
commit f53eb1b96a
1 file changed
+2 -1
+2 -1
View File
@@ -11,6 +11,7 @@ from __future__ import annotations
import contextlib
import io
import json
import re
import sys
import tempfile
import types
@@ -55,7 +56,7 @@ def normalize(v, t: Path):
if isinstance(v, list):
return [normalize(x, t) for x in v]
if isinstance(v, str):
return v.replace(str(t), "<T>").replace("\\", "/").replace(setup.EXE, "<EXE>")
return re.sub(rf"(?<![w.-]){re.escape(setup.EXE)}(?![w.-])", "<EXE>", v.replace(str(t), "<T>").replace("\\", "/")) # #973: only the whole name, not "strata-x.log" on Linux
return v