prove

package module
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 12 Imported by: 8

README

go-prove

Go-lang implementation of perl prove

INSTALL

go install github.com/shogo82148/go-prove/cli/go-prove@latest

USAGE

go-prove [options] [files or directories]

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPluginLoader

func AppendPluginLoader(name string, loader PluginLoader)

Types

type Formatter

type Formatter interface {
	// Called to create a new test
	OpenTest(test *test.Test)

	// Prints the report after all tests are run
	Report() error
}

type Plugin

type Plugin interface {
	Run(w *Worker, f func())
}

type PluginLoader

type PluginLoader interface {
	Load(name, args string) Plugin
}

type PluginLoaderFunc

type PluginLoaderFunc func(name, args string) Plugin

func (PluginLoaderFunc) Load

func (f PluginLoaderFunc) Load(name, args string) Plugin

type Prove

type Prove struct {
	FlagSet *flag.FlagSet

	// Run N test jobs in parallel
	Jobs int

	// Execution command for running test
	Exec string

	Formatter Formatter

	Merge   bool
	Plugins []Plugin

	Mutex    *sync.Mutex
	ExitCode int
	// contains filtered or unexported fields
}

func NewProve

func NewProve() *Prove

func (*Prove) FindTestFiles

func (p *Prove) FindTestFiles() []string

FindTestFiles lists test files.

func (*Prove) MarkAsFail

func (p *Prove) MarkAsFail()

func (*Prove) ParseArgs

func (p *Prove) ParseArgs(args []string)

func (*Prove) Run

func (p *Prove) Run(args []string)

type Worker

type Worker struct {
	Env []string
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(p *Prove, id int) *Worker

func (*Worker) Start

func (w *Worker) Start()

Directories

Path Synopsis
cli
go-prove command

Jump to

Keyboard shortcuts

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