mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
* #1365 - filename options for `split` * Don't use joiner string when prefix is empty. * Add option to specify joiner string. * Add option to not URL-escape file names. * #1365 - update documentation * #1365 - don't URL-escape file name prefix I **_thought_** it'd be cool to apply URL-escaping to the file name prefix as well, just in case it included spaces or other characters. I forgot that a common use for the prefix is to specify a directory path that will contain the file. When the slashes ("`/`") of the path are URL-escaped, they become "`%2F`" and the directories will not be created. So, I moved the prefix handling code to come after the URL-escaping. * #1365 - new `split` options for CLI help output * #1365 - fix escape/suffix logic error Trying to make the `return` statement cleaner, I thought it'd be good to add the file name suffix immediately after the file name is URL-escaped. I'd forgotten that the suffix will not be added if the new `-e` option is used to skip URL-escaping. So, I put the suffix back where I had it. * #1365 - add `split` to the "10 minutes" document Not strictly part of this issue, but as I was checking for docs that I should update as a result of my changes, I noticed this document showed how to split data using the `put` and `tee` combination, but not about the `split` verb. * #1365 - updated manpage When I ran `make dev`, generating `data-diving-examples.md` failed. The two `manpage.txt` files ended up empty, but `mlr.1` seems to be correct. --------- Co-authored-by: Mr. Lance E Sloan (sloanlance) <sloanlance@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| cases | ||
| cases-not-suitable-for-ci | ||
| expected | ||
| input | ||
| stdlib | ||
| README.md | ||
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