TerminalOutputSnapshot class

Captured terminal output with assertion-friendly derived text.

Constructors

TerminalOutputSnapshot(String raw)
Creates a snapshot for raw.
TerminalOutputSnapshot.fromOutput(MockTerminalOutput output)
Creates a snapshot from output.
factory

Properties

containsAnsiControls → bool
Whether raw contains terminal control sequences or control characters.
final
hashCode → int
The hash code for this object.
no setterinherited
isAscii → bool
Whether raw is entirely ASCII.
final
lines → List<String>
Raw output split into lines.
final
normalizedText → String
Plain text with line endings normalized, line-end spaces removed, and final newlines trimmed.
final
plainLines → List<String>
Plain text split into lines.
final
plainText → String
raw with terminal escape/control sequences removed.
final
raw → String
The exact output captured by the mock output.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

hasTerminalControls(String text) → bool
Returns whether text contains terminal controls.
normalizeText(String text) → String
Normalizes stripped terminal output for stable text assertions.
stripTerminalControls(String text) → String
Removes terminal escape sequences and non-line control characters.