more ternary-operator UT

This commit is contained in:
John Kerl 2016-01-12 22:13:15 -05:00
parent 7b79c163e4
commit fd952d926b
2 changed files with 15 additions and 0 deletions

View file

@ -7538,6 +7538,19 @@ name.x 1
name.y 2
z 3
mlr --opprint put $z = $x < 0.5 ? 0 : 1 ./reg_test/input/abixy
a b i x y z
pan pan 1 0.3467901443380824 0.7268028627434533 0
eks pan 2 0.7586799647899636 0.5221511083334797 1
wye wye 3 0.20460330576630303 0.33831852551664776 0
eks wye 4 0.38139939387114097 0.13418874328430463 0
wye pan 5 0.5732889198020006 0.8636244699032729 1
zee pan 6 0.5271261600918548 0.49322128674835697 1
eks zee 7 0.6117840605678454 0.1878849191181694 1
zee wye 8 0.5985540091064224 0.976181385699006 1
hat wye 9 0.03144187646093577 0.7495507603507059 0
pan wye 10 0.5026260055412137 0.9526183602969864 1
================================================================
DSL NULL/EMPTY HANDLING

View file

@ -689,6 +689,8 @@ run_mlr put '$z=max($x, $y)' $indir/minmax.dkvp
run_mlr --icsvlite --oxtab put '${x+y} = ${name.x} + ${name.y}; ${x*y} = ${name.x} * ${name.y}' $indir/braced.csv
run_mlr --icsvlite --oxtab filter '${name.y} < ${z}' $indir/braced.csv
run_mlr --opprint put '$z = $x < 0.5 ? 0 : 1' $indir/abixy
# ----------------------------------------------------------------
announce DSL NULL/EMPTY HANDLING