Move some more cases to regtest v2 (#472)

This commit is contained in:
John Kerl 2021-04-01 15:50:44 +01:00 committed by GitHub
parent 804a1d85cc
commit ebe47bc5ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 269 additions and 349 deletions

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/simple.csv-crlf

View file

@ -0,0 +1,4 @@
a,b,c
1,x,3
4,5,6
x,"y""yy",z

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/simple-truncated.csv

View file

@ -0,0 +1,3 @@
a,b,c
1,x,3
4,5,6

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/narrow.csv

View file

@ -0,0 +1,5 @@
a
1
2
3
4

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/narrow-truncated.csv

View file

@ -0,0 +1,5 @@
a
1
2
3
4

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/quoted-comma.csv

View file

@ -0,0 +1,3 @@
a,b,c
1,"x,3",y
4,5,6

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/quoted-comma-truncated.csv

View file

@ -0,0 +1,3 @@
a,b,c
1,"x,3",y
4,5,6

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/quoted-crlf.csv

View file

@ -0,0 +1,4 @@
a,b,c
1,"x
3",y
4,5,6

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/quoted-crlf-truncated.csv

View file

@ -0,0 +1,4 @@
a,b,c
1,"x
3",y
4,5,6

View file

@ -0,0 +1 @@
mlr --csv cat reg-test/input/rfc-csv/simple-truncated.csv reg-test/input/rfc-csv/simple.csv-crlf

View file

@ -0,0 +1,6 @@
a,b,c
1,x,3
4,5,6
1,x,3
4,5,6
x,"y""yy",z

View file

@ -0,0 +1 @@
mlr --csv --ifs semicolon --ofs pipe --irs lf --ors lflf cut -x -f b reg-test/input/rfc-csv/modify-defaults.csv

View file

@ -0,0 +1,6 @@
a|c
1|3
4|6

View file

@ -0,0 +1 @@
mlr --csv --rs lf --quote-original cut -o -f c,b,a reg-test/input/quote-original.csv

View file

@ -0,0 +1,4 @@
c,b,a
3,2,1
6,"5",4
"9",8,"7"

View file

@ -0,0 +1 @@
mlr --icsv --oxtab cat reg-test/input/comma-at-eof.csv

View file

@ -0,0 +1,7 @@
a 1
b 2
c 3
a 4
b 5
c

View file

@ -0,0 +1 @@
mlr --csv --quote-all cat reg-test/input/rfc-csv/simple.csv-crlf

View file

@ -0,0 +1,4 @@
"a","b","c"
"1","x","3"
"4","5","6"
"x","y""yy","z"

View file

@ -0,0 +1 @@
mlr --csv --quote-original cat reg-test/input/rfc-csv/simple.csv-crlf

View file

@ -0,0 +1,4 @@
a,b,c
1,x,3
4,5,6
"x","y""yy","z"

View file

@ -0,0 +1 @@
mlr --itsv --rs lf --oxtab cat reg-test/input/simple.tsv

View file

@ -0,0 +1,29 @@
a pan
b pan
i 1
x 2
y 0.989945
a eks
b pan
i 2
x 1
y 0.775159
a wye
b wye
i 3
x 1
y 0.761642
a eks
b wye
i 4
x 5
y 0.322934
a wye
b pan
i 5
x 5
y 0.448283

View file

@ -0,0 +1 @@
mlr --iusv --oxtab cat reg-test/input/example.usv

View file

@ -0,0 +1,7 @@
a d
b e
c f
a g
b h
c i

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$length = length($a)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,length=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,length=1
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,length=1
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,length=1
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,length=1
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,length=1
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,length=1
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,length=1
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,length=1
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,length=1

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$length = length($*)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,length=5
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,length=5
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,length=5
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,length=5
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,length=5
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,length=5
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,length=5
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,length=5
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,length=5
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,length=5

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '$length= length({3:4, 5:{6:7}, 8:{9:{10:11}}})'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,length=3
x=6,y=7,u=8,length=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put 'o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $length = length(o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,length=3
x=6,y=7,u=8,length=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '@o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $length = length(@o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,length=3
x=6,y=7,u=8,length=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$depth = depth($a)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,depth=0
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,depth=0
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,depth=0
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,depth=0
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,depth=0
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,depth=0
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,depth=0
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,depth=0
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,depth=0
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,depth=0

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$depth = depth($*)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,depth=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,depth=1
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,depth=1
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,depth=1
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,depth=1
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,depth=1
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,depth=1
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,depth=1
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,depth=1
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,depth=1

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '$depth= depth({3:4, 5:{6:7}, 8:{9:{10:11}}})'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,depth=3
x=6,y=7,u=8,depth=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put 'o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $depth = depth(o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,depth=3
x=6,y=7,u=8,depth=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '@o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $depth = depth(@o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,depth=3
x=6,y=7,u=8,depth=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$leafcount = leafcount($a)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,leafcount=1
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,leafcount=1
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,leafcount=1
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,leafcount=1
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,leafcount=1
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,leafcount=1
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,leafcount=1
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,leafcount=1
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,leafcount=1
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,leafcount=1

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put '$leafcount = leafcount($*)'

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,leafcount=5
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,leafcount=5
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,leafcount=5
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,leafcount=5
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,leafcount=5
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,leafcount=5
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,leafcount=5
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,leafcount=5
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,leafcount=5
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,leafcount=5

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '$leafcount= leafcount({3:4, 5:{6:7}, 8:{9:{10:11}}})'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,leafcount=3
x=6,y=7,u=8,leafcount=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put 'o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $leafcount = leafcount(o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,leafcount=3
x=6,y=7,u=8,leafcount=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/xyz2 put '@o = {3:4, 5:{6:7}, 8:{9:{10:11}}}; $leafcount = leafcount(@o)'

View file

@ -0,0 +1,2 @@
x=3,y=4,z=5,leafcount=3
x=6,y=7,u=8,leafcount=3

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put -q 'dump {"a"."b":$a.$b}'

View file

@ -0,0 +1,30 @@
{
"ab": "panpan"
}
{
"ab": "ekspan"
}
{
"ab": "wye"
}
{
"ab": "eks"
}
{
"ab": "wyepan"
}
{
"ab": "zeepan"
}
{
"ab": "ekszee"
}
{
"ab": "zeewye"
}
{
"ab":
}
{
"ab": "panwye"
}

View file

@ -0,0 +1 @@
mlr --from reg-test/input/abixy-het put -q 'func f(a, b) { return {"a"."b":a.b} } dump f($a, $b)'

View file

@ -0,0 +1,30 @@
{
"ab": "panpan"
}
{
"ab": "ekspan"
}
{
"ab": "wye"
}
{
"ab": "eks"
}
{
"ab": "wyepan"
}
{
"ab": "zeepan"
}
{
"ab": "ekszee"
}
{
"ab": "zeewye"
}
{
"ab":
}
{
"ab": "panwye"
}

View file

@ -1,20 +0,0 @@
run_mlr --csv cat $indir/rfc-csv/simple.csv-crlf
run_mlr --csv cat $indir/rfc-csv/simple-truncated.csv
run_mlr --csv cat $indir/rfc-csv/narrow.csv
run_mlr --csv cat $indir/rfc-csv/narrow-truncated.csv
run_mlr --csv cat $indir/rfc-csv/quoted-comma.csv
run_mlr --csv cat $indir/rfc-csv/quoted-comma-truncated.csv
run_mlr --csv cat $indir/rfc-csv/quoted-crlf.csv
run_mlr --csv cat $indir/rfc-csv/quoted-crlf-truncated.csv
run_mlr --csv cat $indir/rfc-csv/simple-truncated.csv $indir/rfc-csv/simple.csv-crlf
run_mlr --csv --ifs semicolon --ofs pipe --irs lf --ors lflf cut -x -f b $indir/rfc-csv/modify-defaults.csv
run_mlr --csv --rs lf --quote-original cut -o -f c,b,a $indir/quote-original.csv
run_mlr --icsv --oxtab cat $indir/comma-at-eof.csv
run_mlr --csv --quote-all cat $indir/rfc-csv/simple.csv-crlf
run_mlr --csv --quote-original cat $indir/rfc-csv/simple.csv-crlf
run_mlr --itsv --rs lf --oxtab cat $indir/simple.tsv
run_mlr --iusv --oxtab cat $indir/example.usv

Some files were not shown because too many files have changed in this diff Show more