Files
pokerfreak/mac/Tests/Pruefung/QuellbaumSpec.swift
T
mmintel 9c79d8236b Acceptance 5.11.: channel play without AFK, quiet focus, working Cockpit, stronger play
- Practice tables: 20-min session 54/54 turns at the server, control session 28 turns,
  0 timeouts; stage: 3 tables, two rounds each, clean teardown.
- Never let the clock run: an engine abstention becomes check or fold (nie_verstreichen).
- Mittler join in a fixed order (kill the duplicate, then announce), a mittler ends with its
  game, the laufwache opens no tables, stop waits for the runner to stand up.
- Focus: no lobby connections from HUD, probes or layout; "Focus Window on Turn" off.
- Tables: disconnected or sitting-out opponents do not count; a table without channel is
  closed and avoided after 45 s; the join event keeps the writer's pid (strict invariants).
- Geldwache: same room list as the runner, the table's own report, stand up before closing.
- Engine: the small blind completes the top 65 % against limpers (price per fair share);
  the calling range of a bet is as wide as the villain calls - value bets into stations.
- Cockpit: the source tree never comes from SHELL; one operating set for laufwache and
  Cockpit (sicht/start.py --client, ServerStart).
- Project lives in ~/Projects/pokerfreak (kern was a detour).
2026-11-05 16:10:43 +01:00

35 lines
1.5 KiB
Swift

import CockpitKern
import Testing
@Suite("Quellbaum: wo das Cockpit den Laeufer findet")
struct QuellbaumSpec {
private let gebaut = "/Users/x/Projects/pokerfreak"
@Test("die Login-Shell ist nie der Quellbaum - jede App, die macOS startet, erbt SHELL=/bin/zsh")
func nieDieLoginShell() {
#expect(Quellbaum.waehlen(umgebung: ["SHELL": "/bin/zsh"], eingetragen: "/a/pokerfreak", gebaut: gebaut) == "/a/pokerfreak")
#expect(Quellbaum.waehlen(umgebung: ["SHELL": "/bin/zsh"], eingetragen: nil, gebaut: gebaut) == gebaut)
}
@Test("ausdruecklich gesetzt (QUELLBAUM) geht vor dem eingetragenen Pfad")
func ausdruecklich() {
#expect(Quellbaum.waehlen(umgebung: ["QUELLBAUM": "/b/zweiter"], eingetragen: "/a/pokerfreak", gebaut: gebaut) == "/b/zweiter")
}
@Test("der beim Bauen eingetragene Pfad geht vor dem Kompilierort")
func eingetragen() {
#expect(Quellbaum.waehlen(umgebung: [:], eingetragen: "/a/pokerfreak", gebaut: gebaut) == "/a/pokerfreak")
}
@Test("ohne Angabe der Baum, aus dem kompiliert wurde")
func kompilierort() {
#expect(Quellbaum.waehlen(umgebung: [:], eingetragen: nil, gebaut: gebaut) == gebaut)
}
@Test("leere Angaben zaehlen nicht")
func leer() {
#expect(Quellbaum.waehlen(umgebung: ["QUELLBAUM": ""], eingetragen: "/a/pokerfreak", gebaut: gebaut) == "/a/pokerfreak")
#expect(Quellbaum.waehlen(umgebung: [:], eingetragen: "", gebaut: gebaut) == gebaut)
}
}