mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 08:55:41 +00:00
split/join UT
This commit is contained in:
parent
6ff238fe09
commit
63ca8dff7a
4 changed files with 128 additions and 4 deletions
|
|
@ -399,7 +399,7 @@ reg-test:
|
|||
# ----------------------------------------------------------------
|
||||
# Run this after unit-test expected output has changed, and is verified to be
|
||||
# OK. (Example: after adding new test cases in test/run.)
|
||||
regtest-copy:
|
||||
regtest-copy taters:
|
||||
cp output-regtest/out reg_test/expected
|
||||
regtest-copy-dev:
|
||||
cp output-regtest/out-dev reg_test/expected
|
||||
|
|
|
|||
|
|
@ -46644,6 +46644,129 @@ i 10
|
|||
x 0.5026260055412137
|
||||
y 0.9526183602969864
|
||||
|
||||
mlr --oxtab --from ./reg_test/input/abixy-het put s = joink({1:2, "abc":4, 5:"xyz"}, ":"); $* = splitnv(s, ":")
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
1 1
|
||||
2 abc
|
||||
3 5
|
||||
|
||||
mlr --oxtab --from ./reg_test/input/abixy-het put s = joinv({1:2, "abc":4, 5:"xyz"}, ":"); $* = splitnv(s, ":")
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
1 2
|
||||
2 4
|
||||
3 xyz
|
||||
|
||||
mlr --oxtab --from ./reg_test/input/abixy-het put s = joinkv({1:2, "abc":4, 5:"xyz"}, ":", ";"); $* = splitkv(s, ":", ";")
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
1 2
|
||||
abc 4
|
||||
5 xyz
|
||||
|
||||
|
||||
================================================================
|
||||
MAPVAR EMIT
|
||||
|
|
|
|||
|
|
@ -5457,6 +5457,10 @@ run_mlr --oxtab --from $indir/abixy-het put 's = joink($*, ":"); $* = splitnv(s,
|
|||
run_mlr --oxtab --from $indir/abixy-het put 's = joinv($*, ":"); $* = splitnv(s, ":")'
|
||||
run_mlr --oxtab --from $indir/abixy-het put 's = joinkv($*, ":", ";"); $* = splitkv(s, ":", ";")'
|
||||
|
||||
run_mlr --oxtab --from $indir/abixy-het put 's = joink({1:2, "abc":4, 5:"xyz"}, ":"); $* = splitnv(s, ":")'
|
||||
run_mlr --oxtab --from $indir/abixy-het put 's = joinv({1:2, "abc":4, 5:"xyz"}, ":"); $* = splitnv(s, ":")'
|
||||
run_mlr --oxtab --from $indir/abixy-het put 's = joinkv({1:2, "abc":4, 5:"xyz"}, ":", ";"); $* = splitkv(s, ":", ";")'
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
announce MAPVAR EMIT
|
||||
|
||||
|
|
|
|||
|
|
@ -222,9 +222,6 @@ SYNTAX ERROR IMPROVEMENT:
|
|||
================================================================
|
||||
UT FOR 5.0.0:
|
||||
|
||||
* joink joinv joinkv splitnv splitkv test in various contexts esp free-and-replace.
|
||||
* joink joinv joinkv splitnv splitkv memmgt / valgrinds !
|
||||
|
||||
* all assert_X() cases
|
||||
* all type-decl cases: local/forbind/argpass; initial assign & reuse thereafter.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue