run<T> method

T run<T>(
  1. T body(
    1. Terminice t
    )
)

Runs body with this tester's terminal active.

The previously active terminal is restored whether body succeeds or throws.

Implementation

T run<T>(T Function(Terminice t) body) {
  return TerminalContext.runWith(terminal, () => body(terminice));
}