testdriver

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: BSD-3-Clause Imports: 24 Imported by: 0

Documentation

Overview

Package testdriver is a support package for plugins written using github.com/myitcv/govim

Index

Constants

View Source
const (
	KeyErrLog = "errLog"
)

Variables

This section is empty.

Functions

func Condition added in v0.0.13

func Condition(cond string) (bool, error)

func ErrLogMatch added in v0.0.18

func ErrLogMatch(ts *testscript.TestScript, neg bool, args []string)

func Sleep added in v0.0.3

func Sleep(ts *testscript.TestScript, neg bool, args []string)

Sleep is a convenience function for those odd occasions when you need to drop in a sleep, e.g. waiting for CursorHold to trigger

func Vim

func Vim() (exitCode int)

Vim is a sidecar that effectively drives Vim via a simple JSON-based API

Types

type Config added in v0.0.21

type Config struct {
	Name, GovimPath, TestHomePath, TestPluginPath string
	Debug
	Log io.Writer
	*testscript.Env
	Plugin govim.Plugin
}

type Debug added in v0.0.21

type Debug struct {
	Enabled      bool
	VimLogLevel  int
	VimLogPath   string
	GovimLogPath string
}

type LockingBuffer added in v0.0.18

type LockingBuffer struct {
	LastRead []byte
	// contains filtered or unexported fields
}

func (*LockingBuffer) Bytes added in v0.0.18

func (l *LockingBuffer) Bytes() []byte

func (*LockingBuffer) Write added in v0.0.18

func (l *LockingBuffer) Write(p []byte) (n int, err error)

type TestDriver

type TestDriver struct {
	Log io.Writer
	// contains filtered or unexported fields
}

func NewTestDriver

func NewTestDriver(c *Config) (*TestDriver, error)

func (*TestDriver) Close

func (d *TestDriver) Close()

func (*TestDriver) LogStripANSI added in v0.0.21

func (d *TestDriver) LogStripANSI(r io.Reader)

func (*TestDriver) Logf added in v0.0.21

func (d *TestDriver) Logf(format string, a ...interface{})

func (*TestDriver) Run

func (d *TestDriver) Run() error

func (*TestDriver) Wait

func (d *TestDriver) Wait() error

Jump to

Keyboard shortcuts

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