Files
pebrel/scripts/conformance/cases/scrollback.py
T
kuddev 0e6acf89e3 wip: prepare cross-platform previews and workspace improvements
Capture cross-platform startup, SSH credentials, preview packaging gates, and current SSH, answer-reader, math, and icon work. Remove unrelated product comparisons from public source comments.

Preview helper and shell tests pass locally. Native macOS/Linux build, test, and package validation remain pending in CI. Local Windows-only hooks cannot execute under WSL; content and workflow checks were run separately.
2026-09-05 14:51:55 +08:00

27 lines
853 B
Python

from __future__ import annotations
import re
from conformance.harness import ConformanceContext, require
def run(ctx: ConformanceContext) -> dict[str, object]:
generated_lines = 600
marker = "NEBULA_SCROLL_DONE"
ctx.prompt(ctx.scrollback_command(generated_lines, marker))
_, read = ctx.wait_for_line(re.compile(marker), timeout=20.0)
read = ctx.poll(
lambda: ctx.read(lines=40),
lambda value: int(value["history_available"]) >= 500,
"terminal history never retained 500 rows",
timeout=5.0,
)
history = int(read["history_available"])
require(history >= 500, f"only {history} scrollback rows are available")
return {
"generated_lines": generated_lines,
"completion_marker_seen": True,
"history_at_least_500": True,
"history_available": history,
}