18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 18:35:00 +01:00
Files
maszyna/tests/scenarios/cases/en57_2000_automatic_coupler_couples.json
jerrrrycho 85119cc110 test(scenarios): automatic coupler cases (#86)
Re-lands #288, which was merged into feat/exe-test-mode after that
branch had already gone to master, so master never got it.

Two EN57-2000 units on td.scn, one standing, the other rolling into it
without a driver. At 50 km/h their automatic couplers mustn't catch: the
log has to show the collision and the derailment. At 4 km/h they couple
and nothing collides. Nothing reports a result, so both cases end on the
60 s test timeout.

run.py gets log_contains / log_lacks checks on the run's log.txt, and an
"ini" case key for extra eu07.ini lines (here crashdamage yes). The log
checks fail when log.txt is missing or empty: with no log text log_lacks
would pass without checking anything.
2026-11-11 11:35:43 +01:00

18 lines
606 B
JSON

{
"description": "Issue #86, the control case: an EN57-2000 unit without a driver rolls at 4 km/h into a standing one on td.scn. Their automatic couplers catch, nothing collides nor derails; nothing reports a result, so the run ends on the 60 s test timeout.",
"base_scenery": "td.scn",
"ini": ["crashdamage yes"],
"fragment": "td_automatic_coupler_hit.scn",
"vars": {
"velocity": "4",
"offset": "30"
},
"expect": "timeout",
"duration": 60,
"timeout": 300,
"checks": [
{ "type": "log_lacks", "pattern": "collided" },
{ "type": "log_lacks", "pattern": "derailed" }
]
}