luatesting

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLines

func CheckLines(output []byte, checkers []LineChecker) error

func RunLuaTest

func RunLuaTest(source []byte, setup func(*runtime.Runtime)) error

func RunLuaTestsInDir

func RunLuaTestsInDir(t *testing.T, dirpath string, setup func(*runtime.Runtime))

func RunSource

func RunSource(r *runtime.Runtime, source []byte)

RunSource compiles and runs some source code, outputting to the provided io.Writer.

Types

type LineChecker

type LineChecker interface {
	CheckLine([]byte) error
}

func ExtractLineCheckers

func ExtractLineCheckers(source []byte) []LineChecker

type LiteralLineChecker

type LiteralLineChecker []byte

func (LiteralLineChecker) CheckLine

func (c LiteralLineChecker) CheckLine(output []byte) error

type RegexLineChecker

type RegexLineChecker regexp.Regexp

func (*RegexLineChecker) CheckLine

func (c *RegexLineChecker) CheckLine(output []byte) error

Jump to

Keyboard shortcuts

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