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

hosttest

package
v0.3.3 Latest Latest
Warning

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

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

Documentation

Overview

Package hosttest plays AutoDoc's side of the plugin protocol for the examples' tests: it runs a Handler under plugin.ServeConn over a pair of pipes, as AutoDoc runs a plugin's process, sends the host's notifications and reads the frames the plugin sends back.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

type Host struct {
	// contains filtered or unexported fields
}

Host is a test's end of the link.

func Start

func Start(t *testing.T, h plugin.Handler, w, hh int, theme plugin.Theme) *Host

Start serves h and opens it at w×h in theme, at the newest protocol, answering the handshake.

func (*Host) Key

func (hs *Host) Key(k plugin.Key)

Key types k into the plugin.

func (*Host) Press

func (hs *Host) Press(x, y int)

Press is a left press at (x, y) in the frame (protocol 6).

func (*Host) Screen

func (hs *Host) Screen(want string) string

Screen waits for the screen to hold want, the last frame read or one after it, and returns that frame, a row per line.

func (*Host) Theme

func (hs *Host) Theme(t plugin.Theme)

Theme switches the theme.

func (*Host) Type

func (hs *Host) Type(s string)

Type types each character of s.

Jump to

Keyboard shortcuts

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