mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-25 08:53:55 +00:00
regression tests
This commit is contained in:
parent
49e551c794
commit
e53dee0871
48 changed files with 71 additions and 2 deletions
1
test/cases/dsl-unformat/0001/cmd
Normal file
1
test/cases/dsl-unformat/0001/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
1
test/cases/dsl-unformat/0001/experr
Normal file
1
test/cases/dsl-unformat/0001/experr
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr: function unformat invoked with 0 arguments; expected 2
|
||||
0
test/cases/dsl-unformat/0001/expout
Normal file
0
test/cases/dsl-unformat/0001/expout
Normal file
3
test/cases/dsl-unformat/0001/mlr
Normal file
3
test/cases/dsl-unformat/0001/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat()
|
||||
}
|
||||
0
test/cases/dsl-unformat/0001/should-fail
Normal file
0
test/cases/dsl-unformat/0001/should-fail
Normal file
1
test/cases/dsl-unformat/0002/cmd
Normal file
1
test/cases/dsl-unformat/0002/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0002/experr
Normal file
0
test/cases/dsl-unformat/0002/experr
Normal file
1
test/cases/dsl-unformat/0002/expout
Normal file
1
test/cases/dsl-unformat/0002/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
(error)
|
||||
3
test/cases/dsl-unformat/0002/mlr
Normal file
3
test/cases/dsl-unformat/0002/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat(1, 2)
|
||||
}
|
||||
1
test/cases/dsl-unformat/0003/cmd
Normal file
1
test/cases/dsl-unformat/0003/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0003/experr
Normal file
0
test/cases/dsl-unformat/0003/experr
Normal file
1
test/cases/dsl-unformat/0003/expout
Normal file
1
test/cases/dsl-unformat/0003/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
(error)
|
||||
3
test/cases/dsl-unformat/0003/mlr
Normal file
3
test/cases/dsl-unformat/0003/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("12m34s", "{}:{}")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0004/cmd
Normal file
1
test/cases/dsl-unformat/0004/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0004/experr
Normal file
0
test/cases/dsl-unformat/0004/experr
Normal file
1
test/cases/dsl-unformat/0004/expout
Normal file
1
test/cases/dsl-unformat/0004/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
[1, 2]
|
||||
3
test/cases/dsl-unformat/0004/mlr
Normal file
3
test/cases/dsl-unformat/0004/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}:{}", "1:2")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0005/cmd
Normal file
1
test/cases/dsl-unformat/0005/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0005/experr
Normal file
0
test/cases/dsl-unformat/0005/experr
Normal file
1
test/cases/dsl-unformat/0005/expout
Normal file
1
test/cases/dsl-unformat/0005/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
(error)
|
||||
3
test/cases/dsl-unformat/0005/mlr
Normal file
3
test/cases/dsl-unformat/0005/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}:{}", "1")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0006/cmd
Normal file
1
test/cases/dsl-unformat/0006/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0006/experr
Normal file
0
test/cases/dsl-unformat/0006/experr
Normal file
1
test/cases/dsl-unformat/0006/expout
Normal file
1
test/cases/dsl-unformat/0006/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
[1, ""]
|
||||
3
test/cases/dsl-unformat/0006/mlr
Normal file
3
test/cases/dsl-unformat/0006/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}:{}", "1:")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0007/cmd
Normal file
1
test/cases/dsl-unformat/0007/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0007/experr
Normal file
0
test/cases/dsl-unformat/0007/experr
Normal file
1
test/cases/dsl-unformat/0007/expout
Normal file
1
test/cases/dsl-unformat/0007/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
[1, 2]
|
||||
3
test/cases/dsl-unformat/0007/mlr
Normal file
3
test/cases/dsl-unformat/0007/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}:{}", "1:2")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0008/cmd
Normal file
1
test/cases/dsl-unformat/0008/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0008/experr
Normal file
0
test/cases/dsl-unformat/0008/experr
Normal file
1
test/cases/dsl-unformat/0008/expout
Normal file
1
test/cases/dsl-unformat/0008/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
[1, "2:3"]
|
||||
3
test/cases/dsl-unformat/0008/mlr
Normal file
3
test/cases/dsl-unformat/0008/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}:{}", "1:2:3")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0009/cmd
Normal file
1
test/cases/dsl-unformat/0009/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
11
test/cases/dsl-unformat/0009/experr
Normal file
11
test/cases/dsl-unformat/0009/experr
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
mlr: cannot parse DSL expression.
|
||||
Parse error on token ""<abc:defi)
|
||||
" at line 2 column 29.
|
||||
Expected one of:
|
||||
{ ( ) field_name $[ braced_field_name $[[ $[[[ full_srec oosvar_name @[
|
||||
braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .- !
|
||||
~ string_literal regex_case_insensitive int_literal float_literal boolean_literal
|
||||
null_literal const_M_PI const_M_E panic [ ctx_IPS ctx_IFS ctx_IRS ctx_OPS
|
||||
ctx_OFS ctx_ORS ctx_FLATSEP ctx_NF ctx_NR ctx_FNR ctx_FILENAME ctx_FILENUM
|
||||
env func
|
||||
|
||||
0
test/cases/dsl-unformat/0009/expout
Normal file
0
test/cases/dsl-unformat/0009/expout
Normal file
3
test/cases/dsl-unformat/0009/mlr
Normal file
3
test/cases/dsl-unformat/0009/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("<{}:{}>", "<abc:defi)
|
||||
}
|
||||
0
test/cases/dsl-unformat/0009/should-fail
Normal file
0
test/cases/dsl-unformat/0009/should-fail
Normal file
1
test/cases/dsl-unformat/0010/cmd
Normal file
1
test/cases/dsl-unformat/0010/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0010/experr
Normal file
0
test/cases/dsl-unformat/0010/experr
Normal file
1
test/cases/dsl-unformat/0010/expout
Normal file
1
test/cases/dsl-unformat/0010/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
[5, 18, 47, 22]
|
||||
3
test/cases/dsl-unformat/0010/mlr
Normal file
3
test/cases/dsl-unformat/0010/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformat("{}-{}:{}:{}", "5-18:47:22")
|
||||
}
|
||||
1
test/cases/dsl-unformat/0011/cmd
Normal file
1
test/cases/dsl-unformat/0011/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr -n put -f ${CASEDIR}/mlr
|
||||
0
test/cases/dsl-unformat/0011/experr
Normal file
0
test/cases/dsl-unformat/0011/experr
Normal file
1
test/cases/dsl-unformat/0011/expout
Normal file
1
test/cases/dsl-unformat/0011/expout
Normal file
|
|
@ -0,0 +1 @@
|
|||
["5", "18", "47", "22"]
|
||||
3
test/cases/dsl-unformat/0011/mlr
Normal file
3
test/cases/dsl-unformat/0011/mlr
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
end {
|
||||
print unformatx("{}-{}:{}:{}", "5-18:47:22")
|
||||
}
|
||||
1
test/cases/dsl-unformat/x
Normal file
1
test/cases/dsl-unformat/x
Normal file
|
|
@ -0,0 +1 @@
|
|||
print unformat("{}:{}", "1")
|
||||
7
todo.txt
7
todo.txt
|
|
@ -6,12 +6,15 @@ RELEASES
|
|||
================================================================
|
||||
FEATURES
|
||||
|
||||
k better print-interpolate with {} etc
|
||||
! Better functions for values manipulation, e.g. easier conversion of strings like "$1,234.56" into numeric values
|
||||
o note on is_error(x) (or string(x) == "(error)")
|
||||
? dhms w/ optional separgs -- ? what about fenceposting? ["d","h","m","s"] vs ["-",":",":",""] -- ?
|
||||
o 'Ability to specify some formats that are fixed. Like we can process
|
||||
"5d18h53m20s" format in *dhms* commands, but what about "5-18:53:20"? This is
|
||||
a common format used by the SLURM resource manager.'
|
||||
o generalize dhms w/ sscanf-style something -- ?
|
||||
o linked-to faqent w/ -f -s etc ...
|
||||
o ... AND, if it's frequent then submit a feature request b/c other people probably also would like it! :)
|
||||
k better print-interpolate with {} etc
|
||||
! sysdate, sysdate_local; datediff ...
|
||||
! strmatch https://github.com/johnkerl/miller/issues/77#issuecomment-538790927
|
||||
! sliding window / moving average
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue