miller/test
John Kerl bb95f37066
New fmtifnum DSL function; make fmtnum/fmtifnum recursive over maps and arrays (#946)
* New fmtifnum DSL function

* doc-build artifacts for previous commit

* Make fmtnum/fmtifnum recursive over maps and arrays

* Online-help examples for fmtnum/fmtifnum

* doc-build artifacts for previous commit

* unit-test cases

* code-dedupe
2022-02-14 23:57:14 -05:00
..
cases New fmtifnum DSL function; make fmtnum/fmtifnum recursive over maps and arrays (#946) 2022-02-14 23:57:14 -05:00
cases-not-suitable-for-ci Avoid assuming ./mlr is the mlr to test (#876) 2022-01-17 17:01:40 -05:00
expected Standardize Go-package structure (#746) 2021-11-11 14:15:13 -05:00
input Natural sort (#932) 2022-02-08 00:35:28 -05:00
stdlib Standardize Go-package structure (#746) 2021-11-11 14:15:13 -05:00
README.md Reorganization of new-in-miller-6 docpage (#750) 2021-11-13 23:18:35 -05:00

Miller regression tests

There are a few files unit-tested with Go's testing package -- a few dozen cases total.

The vast majority of Miller tests, though -- thousands of cases -- are tested by running scripted invocations of mlr with various flags and inputs, comparing against expected output, and checking the exit code back to the shell.

How to run the regression tests, in brief

Note: while this README.md file is within the test/ subdirectory, all paths in this file are written from the perspective of the user being cd'ed into the repository base directory, i.e. this directory's parent directory.

  • mlr regtest --help

  • go test -- TODO -- also comment

Items for the duration of the Go port

  • mlr regtest -c ... runs the C version of Miller from the local checkout

More details

TODO: needs to be written up

alias mr='mlr regtest'
mr
mr test/cases/foo
mr -v test/cases/foo
mr -cj test/cases/foo/0003
mr -gj test/cases/foo/0003
mr -gp test/cases/foo/0003
...
mr -gp test/cases/foo
git diff
git reset --hard

Creating new cases

TODO: needs to be written up