consoletest

package
v1.118.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package consoletest wires an *iostreams.IOStreams to a real terminal emulator (via ugh) so tests can drive interactive prompts with actual keystrokes instead of pre-canned values. It is kept dependency-light (no internal/api) so packages that internal/api itself depends on, such as internal/oauth2, can use it in tests without an import cycle; cmdtest delegates to it for the same helper.

Index

Constants

View Source
const (
	Width  = 120
	Height = 40
)

Variables

This section is empty.

Functions

func IOStreamsWithConsole

func IOStreamsWithConsole(t *testing.T, console *ugh.Console) (*iostreams.IOStreams, context.CancelFunc)

IOStreamsWithConsole wires an IOStreams to a ugh console driving a real huh form/prompt over an emulated terminal.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL