Documentation
¶
Index ¶
- func ArrayWriterTest(t *testing.T, dataType string, input []string, expected string)
- func ExistsFs(t *testing.T, name string, res embed.FS)
- func InstalledDepsTest(t *testing.T, exec string) bool
- func ReadArrayTest(t *testing.T, dataType string, input []byte, expected []string)
- func ReadMapOrderedTest(t *testing.T, dataType string, input []byte, expected []ReadMapExpected, ...)
- func ReadMapUnorderedTest(t *testing.T, dataType string, input []byte, expected []ReadMapExpected, ...)
- func RunBooleanTests(tests []BooleanTest, t *testing.T)
- func RunMethodRegexTest(t *testing.T, cmd func(*lang.Process) error, methodName string, input string, ...)
- func RunMethodTest(t *testing.T, cmd func(*lang.Process) error, methodName string, input string, ...)
- func RunMurexTests(tests []MurexTest, t *testing.T)
- func RunMurexTestsRx(tests []MurexTest, t *testing.T)
- type BooleanTest
- type MurexTest
- type ReadMapExpected
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayWriterTest ¶
ArrayWriterTest is an easy template for testing stdio.ArrayWriter methods in murex types
func InstalledDepsTest ¶
InstalledDepsTest checks any external dependencies are installed
func ReadArrayTest ¶
ReadArrayTest is an easy template for testing stdio.ReadArray methods in murex types
func ReadMapOrderedTest ¶
func ReadMapOrderedTest(t *testing.T, dataType string, input []byte, expected []ReadMapExpected, config *config.Config)
ReadMapOrderedTest is an easy template for testing stdio.ReadMap methods in murex types with ordered maps
func ReadMapUnorderedTest ¶
func ReadMapUnorderedTest(t *testing.T, dataType string, input []byte, expected []ReadMapExpected, config *config.Config)
ReadMapUnorderedTest is an easy template for testing stdio.ReadMap methods in murex types with unordered maps
func RunBooleanTests ¶
func RunBooleanTests(tests []BooleanTest, t *testing.T)
RunBooleanTests runs through all the test cases for BooleanTest. Please note this shouldn't be confused with the murex scripting language's inbuilt testing framework!
func RunMethodRegexTest ¶
func RunMethodRegexTest(t *testing.T, cmd func(*lang.Process) error, methodName string, input string, dataType string, params []string, outputMatchRx string)
RunMethodRegexTest is a template function for using regex to test builtins run as methods. dataType should be preloaded in calling functions, eg
_ "github.com/lmorg/murex/builtins/types/generic" _ "github.com/lmorg/murex/builtins/types/json"
func RunMethodTest ¶
func RunMethodTest(t *testing.T, cmd func(*lang.Process) error, methodName string, input string, dataType string, params []string, output string, expectedError error)
RunMethodTest is a template function for testing builtins run as methods. dataType should be preloaded in calling functions, eg
_ "github.com/lmorg/murex/builtins/types/generic" _ "github.com/lmorg/murex/builtins/types/json"
func RunMurexTests ¶
RunMurexTests runs through all the test cases for MurexTest where STDOUT/ERR are literal strings
func RunMurexTestsRx ¶
RunMurexTestsRx runs through all the test cases for MurexTest where STDOUT/ERR are regexp expressions
Types ¶
type BooleanTest ¶
BooleanTest is a basic framework for each boolean test of murex code. Please note this shouldn't be confused with the murex scripting language's inbuilt testing framework!
type MurexTest ¶
MurexTest is a basic framework to test murex code. Please note this shouldn't be confused with the murex scripting language's inbuilt testing framework!
type ReadMapExpected ¶
ReadMapExpected is used to list the expected output from stdio.ReadMap for the MapTest() test
func (ReadMapExpected) String ¶
func (m ReadMapExpected) String() string