Help us shape the future of Go! Take the 2026 Go Developer Survey

ptytest

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package ptytest opens a pseudo-terminal for a test: the side the test types into, and the terminal the code under test reads from, which only a pseudo-terminal can stand in for. Each system makes one its own way, so the way lives here, in files of their own, and the tests that type at a terminal build on every system. Only tests import this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(tb testing.TB) (*os.File, *os.File)

Open opens a pseudo-terminal: the side that types into it, and the terminal a program reads from. Both close when the test ends. Where none can be opened, the test is skipped; one opened that cannot be named or unlocked fails it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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