tests

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package tests handles multiple test uploading.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyTest added in v0.7.3

type LazyTest struct {
	models.Test
	Input, Output *zip.File
}

LazyTest is a `models.Test` but input and outputs are `zip.File`s.

func Unpack

func Unpack(zipFile io.ReaderAt, size int64, input, output string) ([]*LazyTest, error)

Unpack try to unpack a zip file and extract tests from the given pattern.

func (*LazyTest) Verify added in v0.7.5

func (lz *LazyTest) Verify() error

Verify calls the underlying Verify method, respecting their wish to have input and output non-null.

type Pattern

type Pattern struct {
	Prefix string
	Suffix string
}

Pattern recognizes the patterns from an input string and try to match it.

func ParsePattern

func ParsePattern(pattern string) (*Pattern, error)

ParsePattern parses a pattern string and create a Pattern struct. Given a pattern string, it matches the ONLY question mark from it and split the rest into a prefix and suffix.

func (*Pattern) Match

func (p *Pattern) Match(target string) (string, bool)

Match tries to match a string, extracting its name.

Jump to

Keyboard shortcuts

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