From 6f88875403aff8720ef19ce08cd3ec002f4f64bd Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 22 Nov 2020 00:46:52 -0500 Subject: [PATCH] reg-test refactor iterate --- c/case-todo | 1349 +-------- .../case-dsl-mapvars-udfs-subroutines.sh | 105 + c/reg_test/case-dsl-oosvar-assignments.sh | 76 + .../case-dsl-prefixed-unprefixed-emit.sh | 67 + c/reg_test/case-dsl-redirects.sh | 727 +++++ c/reg_test/case-dsl-scientific-notation.sh | 34 + c/reg_test/case-dsl-substr.sh | 18 + .../case-dsl-utf8-uppercase-lowercase.sh | 7 + c/reg_test/case-utf8-bom.sh | 4 + .../case-dsl-mapvars-udfs-subroutines.sh.out | 406 +++ .../case-dsl-oosvar-assignments.sh.out | 1279 +++++++++ .../case-dsl-prefixed-unprefixed-emit.sh.out | 2210 +++++++++++++++ c/reg_test/expected/case-dsl-redirects.sh.out | 2451 +++++++++++++++++ .../case-dsl-scientific-notation.sh.out | 142 + c/reg_test/expected/case-dsl-substr.sh.out | 845 ++++++ .../case-dsl-utf8-uppercase-lowercase.sh.out | 31 + .../expected/case-in-place-processing.sh.out | 67 + c/reg_test/expected/case-utf8-bom.sh.out | 21 + 18 files changed, 8642 insertions(+), 1197 deletions(-) create mode 100644 c/reg_test/case-dsl-mapvars-udfs-subroutines.sh create mode 100644 c/reg_test/case-dsl-oosvar-assignments.sh create mode 100644 c/reg_test/case-dsl-prefixed-unprefixed-emit.sh create mode 100644 c/reg_test/case-dsl-redirects.sh create mode 100644 c/reg_test/case-dsl-scientific-notation.sh create mode 100644 c/reg_test/case-dsl-substr.sh create mode 100644 c/reg_test/case-dsl-utf8-uppercase-lowercase.sh create mode 100644 c/reg_test/case-utf8-bom.sh create mode 100644 c/reg_test/expected/case-dsl-mapvars-udfs-subroutines.sh.out create mode 100644 c/reg_test/expected/case-dsl-oosvar-assignments.sh.out create mode 100644 c/reg_test/expected/case-dsl-prefixed-unprefixed-emit.sh.out create mode 100644 c/reg_test/expected/case-dsl-redirects.sh.out create mode 100644 c/reg_test/expected/case-dsl-scientific-notation.sh.out create mode 100644 c/reg_test/expected/case-dsl-substr.sh.out create mode 100644 c/reg_test/expected/case-dsl-utf8-uppercase-lowercase.sh.out create mode 100644 c/reg_test/expected/case-utf8-bom.sh.out diff --git a/c/case-todo b/c/case-todo index ee2bdb6de..32e714e16 100644 --- a/c/case-todo +++ b/c/case-todo @@ -1,981 +1,3 @@ -## Test early-out for unkeyed head -#run_mlr head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide -#run_mlr head -n 2 -g a then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide -#run_mlr cat then head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide -#run_mlr tac then head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide -#run_mlr head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide $indir/abixy-wide $indir/abixy-wide - -## ---------------------------------------------------------------- -#announce NON-INTERPOLATED AND INTERPOLATED PERCENTILES -# -#for k in 1 2 3 4 5 6 7 8 9 10 11; do -#run_mlr --from $indir/x0to10.dat --oxtab head -n $k then stats1 -f x -a p00,p01,p02,p03,p04,p05,p06,p07,p08,p09,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100 -#done -# -#for k in 1 2 3 4 5 6 7 8 9 10 11; do -#run_mlr --from $indir/x0to10.dat --oxtab head -n $k then stats1 -i -f x -a p00,p01,p02,p03,p04,p05,p06,p07,p08,p09,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100 -#done - -## ---------------------------------------------------------------- -#announce DSL SCIENTIFIC NOTATION IN FIELD VALUES -# -#run_mlr --opprint put '$y=$x+1' $indir/scinot.dkvp - -## ---------------------------------------------------------------- -#announce DSL SCIENTIFIC NOTATION IN EXPRESSION LITERALS -# -#run_mlr --opprint put '$y = 123 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 123. + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 123.4 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = .234 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1e2 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1e-2 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1.2e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1.e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1.2e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1.e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = .2e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = .2e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = 1.e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -123 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -123. + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -123.4 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -.234 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1e2 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1e-2 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1.2e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1.e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1.2e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1.e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -.2e3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -.2e-3 + $i' $indir/scinot1.dkvp -#run_mlr --opprint put '$y = -1.e-3 + $i' $indir/scinot1.dkvp - -## ---------------------------------------------------------------- -#announce UTF-8 STRLEN -# -#run_mlr --inidx --ifs comma --oxtab put '$s1=strlen($1);$s2=strlen($2);$s3=strlen($3);$s4=strlen($4)' $indir/utf8-align.dkvp - -## ---------------------------------------------------------------- -#announce STATS1/STEP INT/FLOAT -# -#run_mlr --opprint step -a rsum,delta,counter -f x,y,z $indir/int-float.dkvp -#run_mlr --opprint step -F -a rsum,delta,counter -f x,y,z $indir/int-float.dkvp -#run_mlr --oxtab stats1 -a min,max,sum,count -f x,y,z $indir/int-float.dkvp -#run_mlr --oxtab stats1 -F -a min,max,sum,count -f x,y,z $indir/int-float.dkvp - -## ---------------------------------------------------------------- -#announce DSL TYPED OVERLAY -# -#run_mlr put '$y = string($x); $z=$y.$y' $indir/int-float.dkvp -#run_mlr put '$z=string($x).string($x)' $indir/int-float.dkvp -#run_mlr put '$y = string($x)' then put '$z=$y.$y' $indir/int-float.dkvp -#run_mlr put '$a="hello"' then put '$b=$a." world";$z=$x+$y;$c=$b;$a=sub($b,"hello","farewell")' $indir/int-float.dkvp - - -## ---------------------------------------------------------------- -#announce DSL SUBSTR -# -#run_mlr put -q ' -# int n = strlen($x); -# print "input= <<".$x.">>"; -# for (i = -n-2; i <= n+2; i += 1) { -# for (j = -n-2; j <= n+2; j += 1) { -# print "i: ".fmtnum(i,"%3lld") -# ." j:".fmtnum(j,"%3lld") -# ." substr(".$x.",".fmtnum(i,"%3lld").",".fmtnum(j,"%3lld")."): <<" -# .substr($x, i, j) .">>"; -# } -# print; -#} -#' << EOF -#x= -#x=o -#x=o1 -#x=o123456789 -#EOF - -## ---------------------------------------------------------------- -#announce OOSVAR-FROM-SREC ASSIGNMENT -# -#run_mlr put -v '@v = $*' /dev/null -#run_mlr put -v '@v[1] = $*' /dev/null -#run_mlr put -v '@v[$2] = $*' /dev/null -#run_mlr put -v 'NR == 3 {@v = $*}' /dev/null -#run_mlr put -v 'NR == 3 {@v[1] = $*}' /dev/null -#run_mlr put -v 'NR == 3 {@v[$2] = $*}' /dev/null -# -#run_mlr --oxtab put -q '@v = $*; end {emitp @v }' $indir/abixy-het -# -#run_mlr --oxtab put -q '@v[$a] = $*; end {emitp @v }' $indir/abixy-het -#run_mlr --oxtab put -q '@v[$a] = $*; end {emitp @v, "a" }' $indir/abixy-het -# -#run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v }' $indir/abixy-het -#run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v, "a" }' $indir/abixy-het -#run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v, "a", "b"}' $indir/abixy-het - -## ---------------------------------------------------------------- -#announce SREC-FROM-OOSVAR ASSIGNMENT -# -#run_mlr put -v '$* = @v ' /dev/null -#run_mlr put -v '$* = @v[1] ' /dev/null -#run_mlr put -v '$* = @v[$2]' /dev/null -#run_mlr put -v 'NR == 3 {$* = @v }' /dev/null -#run_mlr put -v 'NR == 3 {$* = @v[1] }' /dev/null -#run_mlr put -v 'NR == 3 {$* = @v[$2]}' /dev/null -# -#run_mlr put '@v[NR] = $a; NR == 7 { @v = $*} ; $* = @v' $indir/abixy-het - -## ---------------------------------------------------------------- -#announce OOSVAR-FROM-OOSVAR ASSIGNMENT -# -#run_mlr put -v '@u = @v' /dev/null -#run_mlr put -v '@u = @v[1]' /dev/null -#run_mlr put -v '@u[2] = @v' /dev/null -#run_mlr put -v '@u[2] = @v[1]' /dev/null -# -#run_mlr put -v 'begin { @u = @v }' /dev/null -#run_mlr put -v 'begin { @u = @v[1] }' /dev/null -#run_mlr put -v 'begin { @u[2] = @v }' /dev/null -#run_mlr put -v 'begin { @u[2] = @v[1] }' /dev/null -# -#run_mlr put -v 'NR == 3 { @u = @v }' /dev/null -#run_mlr put -v 'NR == 3 { @u = @v[1] }' /dev/null -#run_mlr put -v 'NR == 3 { @u[2] = @v }' /dev/null -#run_mlr put -v 'NR == 3 { @u[2] = @v[1] }' /dev/null -# -#run_mlr put -v 'end { @u = @v }' /dev/null -#run_mlr put -v 'end { @u = @v[1] }' /dev/null -#run_mlr put -v 'end { @u[2] = @v }' /dev/null -#run_mlr put -v 'end { @u[2] = @v[1] }' /dev/null -# -# -#run_mlr put -q '@s += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr put -q '@s[1] += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr put -q '@s[1] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr put -q '@s[1][2] += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr put -q '@s[1][2] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t[3]=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy -#run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy -# -#run_mlr --opprint put -q '@s[NR][NR] = $i/100; @t[NR*10]=@s; end{emitp@s,"A","B"; emitp @t,"C","D","E"}' $indir/abixy - -## ---------------------------------------------------------------- -#announce MAP-VARIANT DUMPS -# -#run_mlr --from $indir/abixy-het put -q 'dump {"a"."b":$a.$b}' -#run_mlr --from $indir/abixy-het put -q 'func f(a, b) { return {"a"."b":a.b} } dump f($a, $b)' - -## ---------------------------------------------------------------- -#announce PREFIXED/UNPREFIXED EMIT -# -#run_mlr --oxtab put -q '@sum += $x; end{dump;emitp @sum }' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum += $x; end{dump;emit @sum }' $indir/abixy-wide -# -# -#run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emitp @sum }' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emit @sum }' $indir/abixy-wide -# -#run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide -# -# -#run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emitp @sum }' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emit @sum }' $indir/abixy-wide -# -#run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide -# -#run_mlr --opprint put -q '@sum[$a][$b] += $x; end{dump;emitp @sum, "a", "b"}' $indir/abixy-wide -#run_mlr --opprint put -q '@sum[$a][$b] += $x; end{dump;emit @sum, "a", "b"}' $indir/abixy-wide -# -# -#run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum }' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum }' $indir/abixy-wide -# -#run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide -#run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide -# -#run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b"}' $indir/abixy-wide -#run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b"}' $indir/abixy-wide -# -#run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b", "ab"}' $indir/abixy-wide -#run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b", "ab"}' $indir/abixy-wide -# -# -# -#run_mlr --oxtab head -n 2 then put -q '@v = $*; end{dump;emitp @v}' $indir/abixy -#run_mlr --oxtab head -n 2 then put -q '@v = $*; end{dump;emit @v}' $indir/abixy -# -# -#run_mlr --oxtab head -n 2 then put -q '@v[NR] = $*; end{dump;emitp @v }' $indir/abixy -#run_mlr --oxtab head -n 2 then put -q '@v[NR] = $*; end{dump;emit @v }' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR] = $*; end{dump;emit @v, "I"}' $indir/abixy -# -# -#run_mlr --oxtab head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v }' $indir/abixy -#run_mlr --oxtab head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v }' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v, "I"}' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v, "I", "J"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v, "I", "J"}' $indir/abixy -# -# -#run_mlr --oxtab head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v }' $indir/abixy -#run_mlr --oxtab head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v }' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I"}' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J"}' $indir/abixy -# -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J", "K"}' $indir/abixy -#run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J", "K"}' $indir/abixy - -## ---------------------------------------------------------------- -#announce MAPPER TEE REDIRECTS -# -#tee1=$reloutdir/tee1 -#mkdir -p $tee1 -# -#run_mlr --from $indir/abixy tee $tee1/out then nothing -#run_cat $tee1/out -# -#run_mlr --from $indir/abixy tee --no-fflush $tee1/out then nothing -#run_cat $tee1/out -# -#run_mlr --from $indir/abixy tee -a $tee1/out then nothing -#run_cat $tee1/out -# -#run_mlr --from $indir/abixy tee -o json $tee1/out then nothing -#run_cat $tee1/out -# -## ---------------------------------------------------------------- -#announce DSL TEE REDIRECTS -# -#tee2=$reloutdir/tee2 -#mkdir -p $tee2 -# -#run_mlr put -q 'tee > "'$tee2'/out.".$a, $*' $indir/abixy -#run_cat $tee2/out.eks -#run_cat $tee2/out.hat -#run_cat $tee2/out.pan -#run_cat $tee2/out.wye -#run_cat $tee2/out.zee -# -#run_mlr put -q --no-fflush 'tee > "'$tee2'/out.".$a, $*' $indir/abixy -#run_cat $tee2/out.eks -#run_cat $tee2/out.hat -#run_cat $tee2/out.pan -#run_cat $tee2/out.wye -#run_cat $tee2/out.zee -# -#run_mlr put -q 'tee >> "'$tee2'/out.".$a, $*' $indir/abixy -#run_cat $tee2/out.eks -#run_cat $tee2/out.hat -#run_cat $tee2/out.pan -#run_cat $tee2/out.wye -#run_cat $tee2/out.zee -# -#run_mlr put -q -o json 'tee > "'$tee2'/out.".$a, $*' $indir/abixy -#run_cat $tee2/out.eks -#run_cat $tee2/out.hat -#run_cat $tee2/out.pan -#run_cat $tee2/out.wye -#run_cat $tee2/out.zee -# -#run_mlr put -q 'tee | "tr \[a-z\] \[A-Z\]", $*' $indir/abixy -# -#run_mlr put -q -o json 'tee | "tr \[a-z\] \[A-Z\]", $*' $indir/abixy -# -#touch $tee2/err1 -#run_mlr put -q 'tee > stdout, $*' $indir/abixy 2> $tee2/err1 -#run_cat $tee2/err1 -# -#touch $tee2/err2 -#run_mlr put -q 'tee > stderr, $*' $indir/abixy 2> $tee2/err2 -#run_cat $tee2/err2 -# -## ---------------------------------------------------------------- -#announce DSL PRINT REDIRECTS -# -#print1=$reloutdir/print1 -#mkdir -p $print1 -# -#run_mlr put -q 'print > "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $print1/out.eks -#run_cat $print1/out.hat -#run_cat $print1/out.pan -#run_cat $print1/out.wye -#run_cat $print1/out.zee -# -#run_mlr put -q 'print > "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $print1/out.eks -#run_cat $print1/out.hat -#run_cat $print1/out.pan -#run_cat $print1/out.wye -#run_cat $print1/out.zee -# -#run_mlr put -q 'print >> "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $print1/out.eks -#run_cat $print1/out.hat -#run_cat $print1/out.pan -#run_cat $print1/out.wye -#run_cat $print1/out.zee -# -#run_mlr put -q 'print | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i' $indir/abixy -# -#touch $print1/err1 -#run_mlr put -q 'print > stdout, "abi:".$a.$b.$i' $indir/abixy 2> $print1/err1 -#run_cat $print1/err1 -# -#touch $print1/err2 -#run_mlr put -q 'print > stderr, "abi:".$a.$b.$i' $indir/abixy 2> $print1/err2 -#run_cat $print1/err2 -# -## ---------------------------------------------------------------- -#announce DSL PRINTN REDIRECTS -# -#printn1=$reloutdir/printn1 -#mkdir -p $printn1 -# -#run_mlr put -q 'printn > "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $printn1/out.eks -#run_cat $printn1/out.hat -#run_cat $printn1/out.pan -#run_cat $printn1/out.wye -#run_cat $printn1/out.zee -# -#run_mlr put -q 'printn > "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $printn1/out.eks -#run_cat $printn1/out.hat -#run_cat $printn1/out.pan -#run_cat $printn1/out.wye -#run_cat $printn1/out.zee -# -#run_mlr put -q 'printn >> "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy -#run_cat $printn1/out.eks -#run_cat $printn1/out.hat -#run_cat $printn1/out.pan -#run_cat $printn1/out.wye -#run_cat $printn1/out.zee -# -#run_mlr put -q 'printn | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i' $indir/abixy -# -#touch $printn1/err1 -#run_mlr put -q 'printn > stdout, "abi:".$a.$b.$i' $indir/abixy 2> $printn1/err1 -#run_cat $printn1/err1 -# -#touch $printn1/err2 -#run_mlr put -q 'printn > stderr, "abi:".$a.$b.$i' $indir/abixy 2> $printn1/err2 -#run_cat $printn1/err2 -# -## ---------------------------------------------------------------- -#announce DSL DUMP REDIRECTS -# -#dump1=$reloutdir/dump1 -#mkdir -p $dump1 -# -#run_mlr put -q '@v=$*; dump > "'$dump1'/out.".$a' $indir/abixy -#run_cat $dump1/out.eks -#run_cat $dump1/out.hat -#run_cat $dump1/out.pan -#run_cat $dump1/out.wye -#run_cat $dump1/out.zee -# -#run_mlr put -q '@v=$*; dump > "'$dump1'/out.".$a' $indir/abixy -#run_cat $dump1/out.eks -#run_cat $dump1/out.hat -#run_cat $dump1/out.pan -#run_cat $dump1/out.wye -#run_cat $dump1/out.zee -# -#run_mlr put -q '@v=$*; dump >> "'$dump1'/out.".$a' $indir/abixy -#run_cat $dump1/out.eks -#run_cat $dump1/out.hat -#run_cat $dump1/out.pan -#run_cat $dump1/out.wye -#run_cat $dump1/out.zee -# -#run_mlr put -q '@v=$*; dump | "tr \[a-z\] \[A-Z\]"' $indir/abixy -# -#touch $dump1/err1 -#run_mlr put -q '@v[NR] = $*; NR == 2 { dump > stdout }' $indir/abixy 2> $dump1/err1 -#run_cat $dump1/err1 -# -#touch $dump1/err2 -#run_mlr put -q '@v[NR] = $*; NR == 2 { dump > stderr }' $indir/abixy 2> $dump1/err2 -#run_cat $dump1/err2 -# -## ---------------------------------------------------------------- -#announce DSL EMITF REDIRECTS -# -#emitf1=$reloutdir/emitf1 -#mkdir -p $emitf1 -# -#run_mlr put -q '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy -#run_cat $emitf1/out.ekspan -#run_cat $emitf1/out.ekswye -#run_cat $emitf1/out.ekszee -#run_cat $emitf1/out.hatwye -#run_cat $emitf1/out.panpan -#run_cat $emitf1/out.panwye -#run_cat $emitf1/out.wyepan -#run_cat $emitf1/out.wyewye -#run_cat $emitf1/out.zeepan -#run_cat $emitf1/out.zeewye -# -#run_mlr put -q '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy -#run_cat $emitf1/out.ekspan -#run_cat $emitf1/out.ekswye -#run_cat $emitf1/out.ekszee -#run_cat $emitf1/out.hatwye -#run_cat $emitf1/out.panpan -#run_cat $emitf1/out.panwye -#run_cat $emitf1/out.wyepan -#run_cat $emitf1/out.wyewye -#run_cat $emitf1/out.zeepan -#run_cat $emitf1/out.zeewye -# -#run_mlr put -q '@a=$a; @b=$b; emitf >> "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy -#run_cat $emitf1/out.ekspan -#run_cat $emitf1/out.ekswye -#run_cat $emitf1/out.ekszee -#run_cat $emitf1/out.hatwye -#run_cat $emitf1/out.panpan -#run_cat $emitf1/out.panwye -#run_cat $emitf1/out.wyepan -#run_cat $emitf1/out.wyewye -#run_cat $emitf1/out.zeepan -#run_cat $emitf1/out.zeewye -# -#run_mlr put -q -o json '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy -#run_cat $emitf1/out.ekspan -#run_cat $emitf1/out.ekswye -#run_cat $emitf1/out.ekszee -#run_cat $emitf1/out.hatwye -#run_cat $emitf1/out.panpan -#run_cat $emitf1/out.panwye -#run_cat $emitf1/out.wyepan -#run_cat $emitf1/out.wyewye -#run_cat $emitf1/out.zeepan -#run_cat $emitf1/out.zeewye -# -#run_mlr put -q '@a=$a; @b=$b; emitf | "tr \[a-z\] \[A-Z\]", @a, @b' $indir/abixy -# -#touch $emitf1/err1 -#run_mlr put -q '@a=$a; @b=$b; emitf > stdout, @a, @b' $indir/abixy 2> $emitf1/err1 -#run_cat $emitf1/err1 -# -#touch $emitf1/err2 -#run_mlr put -q '@a=$a; @b=$b; emitf > stderr, @a, @b' $indir/abixy 2> $emitf1/err2 -#run_cat $emitf1/err2 -# -## ---------------------------------------------------------------- -#announce DSL EMITP REDIRECTS -# -#emitp1=$reloutdir/emitp1 -#mkdir -p $emitp1 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emitp1/out.ekspan -#run_cat $emitp1/out.ekswye -#run_cat $emitp1/out.panpan -#run_cat $emitp1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emitp1/out.ekspan -#run_cat $emitp1/out.ekswye -#run_cat $emitp1/out.panpan -#run_cat $emitp1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emitp1/out.ekspan -#run_cat $emitp1/out.ekswye -#run_cat $emitp1/out.panpan -#run_cat $emitp1/out.wyewye -# -#run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emitp1/out.ekspan -#run_cat $emitp1/out.ekswye -#run_cat $emitp1/out.panpan -#run_cat $emitp1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a' $indir/abixy -# -#touch $emitp1/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @a' $indir/abixy 2> $emitp1/err1 -#run_cat $emitp1/err1 -# -#touch $emitp1/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @a' $indir/abixy 2> $emitp1/err2 -#run_cat $emitp1/err2 -# -# -#emitp2=$reloutdir/emitp2 -#mkdir -p $emitp2 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emitp2/out.ekspan -#run_cat $emitp2/out.ekswye -#run_cat $emitp2/out.panpan -#run_cat $emitp2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emitp2/out.ekspan -#run_cat $emitp2/out.ekswye -#run_cat $emitp2/out.panpan -#run_cat $emitp2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emitp2/out.ekspan -#run_cat $emitp2/out.ekswye -#run_cat $emitp2/out.panpan -#run_cat $emitp2/out.wyewye -# -#run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emitp2/out.ekspan -#run_cat $emitp2/out.ekswye -#run_cat $emitp2/out.panpan -#run_cat $emitp2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a, "NR"' $indir/abixy -# -#touch $emitp2/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @a, "NR"' $indir/abixy 2> $emitp2/err1 -#run_cat $emitp2/err1 -# -#touch $emitp2/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @a, "NR"' $indir/abixy 2> $emitp2/err2 -#run_cat $emitp2/err2 -# -# -#emitp3=$reloutdir/emitp3 -#mkdir -p $emitp3 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emitp3/out.ekspan -#run_cat $emitp3/out.ekswye -#run_cat $emitp3/out.panpan -#run_cat $emitp3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emitp3/out.ekspan -#run_cat $emitp3/out.ekswye -#run_cat $emitp3/out.panpan -#run_cat $emitp3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emitp3/out.ekspan -#run_cat $emitp3/out.ekswye -#run_cat $emitp3/out.panpan -#run_cat $emitp3/out.wyewye -# -#run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emitp3/out.ekspan -#run_cat $emitp3/out.ekswye -#run_cat $emitp3/out.panpan -#run_cat $emitp3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b)' $indir/abixy -# -#touch $emitp3/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b)' $indir/abixy 2> $emitp3/err1 -#run_cat $emitp3/err1 -# -#touch $emitp3/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b)' $indir/abixy 2> $emitp3/err2 -#run_cat $emitp3/err2 -# -# -#emitp4=$reloutdir/emitp4 -#mkdir -p $emitp4 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emitp4/out.ekspan -#run_cat $emitp4/out.ekswye -#run_cat $emitp4/out.panpan -#run_cat $emitp4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emitp4/out.ekspan -#run_cat $emitp4/out.ekswye -#run_cat $emitp4/out.panpan -#run_cat $emitp4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emitp4/out.ekspan -#run_cat $emitp4/out.ekswye -#run_cat $emitp4/out.panpan -#run_cat $emitp4/out.wyewye -# -#run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emitp4/out.ekspan -#run_cat $emitp4/out.ekswye -#run_cat $emitp4/out.panpan -#run_cat $emitp4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR"' $indir/abixy -# -#touch $emitp4/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b), "NR"' $indir/abixy 2> $emitp4/err1 -#run_cat $emitp4/err1 -# -#touch $emitp4/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b), "NR"' $indir/abixy 2> $emitp4/err2 -#run_cat $emitp4/err2 -# -# -#emitp5=$reloutdir/emitp5 -#mkdir -p $emitp5 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp5'/out.".$a.$b, @*' $indir/abixy -#run_cat $emitp5/out.ekspan -#run_cat $emitp5/out.ekswye -#run_cat $emitp5/out.panpan -#run_cat $emitp5/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @*' $indir/abixy -# -#touch $emitp5/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @*' $indir/abixy 2> $emitp5/err1 -#run_cat $emitp5/err1 -# -#touch $emitp5/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @*' $indir/abixy 2> $emitp5/err2 -#run_cat $emitp5/err2 -# -# -#emitp6=$reloutdir/emitp6 -#mkdir -p $emitp6 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp6'/out.".$a.$b, all' $indir/abixy -#run_cat $emitp6/out.ekspan -#run_cat $emitp6/out.ekswye -#run_cat $emitp6/out.panpan -#run_cat $emitp6/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all' $indir/abixy -# -#touch $emitp6/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, all' $indir/abixy 2> $emitp6/err1 -#run_cat $emitp6/err1 -# -#touch $emitp6/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, all' $indir/abixy 2> $emitp6/err2 -#run_cat $emitp6/err2 -# -# -#emitp7=$reloutdir/emitp7 -#mkdir -p $emitp7 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp7'/out.".$a.$b, @*, "NR"' $indir/abixy -#run_cat $emitp7/out.ekspan -#run_cat $emitp7/out.ekswye -#run_cat $emitp7/out.panpan -#run_cat $emitp7/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @*, "NR"' $indir/abixy -# -#touch $emitp7/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @*, "NR"' $indir/abixy 2> $emitp7/err1 -#run_cat $emitp7/err1 -# -#touch $emitp7/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @*, "NR"' $indir/abixy 2> $emitp7/err2 -#run_cat $emitp7/err2 -# -# -#emitp8=$reloutdir/emitp8 -#mkdir -p $emitp8 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp8'/out.".$a.$b, all, "NR"' $indir/abixy -#run_cat $emitp8/out.ekspan -#run_cat $emitp8/out.ekswye -#run_cat $emitp8/out.panpan -#run_cat $emitp8/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all, "NR"' $indir/abixy -# -#touch $emitp8/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, all, "NR"' $indir/abixy 2> $emitp8/err1 -#run_cat $emitp8/err1 -# -#touch $emitp8/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, all, "NR"' $indir/abixy 2> $emitp8/err2 -#run_cat $emitp8/err2 -# -# -## ---------------------------------------------------------------- -#announce DSL EMIT REDIRECTS -# -#emit1=$reloutdir/emit1 -#mkdir -p $emit1 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emit1/out.ekspan -#run_cat $emit1/out.ekswye -#run_cat $emit1/out.panpan -#run_cat $emit1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emit1/out.ekspan -#run_cat $emit1/out.ekswye -#run_cat $emit1/out.panpan -#run_cat $emit1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emit1/out.ekspan -#run_cat $emit1/out.ekswye -#run_cat $emit1/out.panpan -#run_cat $emit1/out.wyewye -# -#run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy -#run_cat $emit1/out.ekspan -#run_cat $emit1/out.ekswye -#run_cat $emit1/out.panpan -#run_cat $emit1/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a' $indir/abixy -# -#touch $emit1/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @a' $indir/abixy 2> $emit1/err1 -#run_cat $emit1/err1 -# -#touch $emit1/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @a' $indir/abixy 2> $emit1/err2 -#run_cat $emit1/err2 -# -# -#emit2=$reloutdir/emit2 -#mkdir -p $emit2 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emit2/out.ekspan -#run_cat $emit2/out.ekswye -#run_cat $emit2/out.panpan -#run_cat $emit2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emit2/out.ekspan -#run_cat $emit2/out.ekswye -#run_cat $emit2/out.panpan -#run_cat $emit2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emit2/out.ekspan -#run_cat $emit2/out.ekswye -#run_cat $emit2/out.panpan -#run_cat $emit2/out.wyewye -# -#run_mlr head -n 4 then put -q -o pprint '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy -#run_cat $emit2/out.ekspan -#run_cat $emit2/out.ekswye -#run_cat $emit2/out.panpan -#run_cat $emit2/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a, "NR"' $indir/abixy -# -#touch $emit2/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @a, "NR"' $indir/abixy 2> $emit2/err1 -#run_cat $emit2/err1 -# -#touch $emit2/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @a, "NR"' $indir/abixy 2> $emit2/err2 -#run_cat $emit2/err2 -# -# -#emit3=$reloutdir/emit3 -#mkdir -p $emit3 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emit3/out.ekspan -#run_cat $emit3/out.ekswye -#run_cat $emit3/out.panpan -#run_cat $emit3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emit3/out.ekspan -#run_cat $emit3/out.ekswye -#run_cat $emit3/out.panpan -#run_cat $emit3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emit3/out.ekspan -#run_cat $emit3/out.ekswye -#run_cat $emit3/out.panpan -#run_cat $emit3/out.wyewye -# -#run_mlr head -n 4 then put -q --oxtab '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy -#run_cat $emit3/out.ekspan -#run_cat $emit3/out.ekswye -#run_cat $emit3/out.panpan -#run_cat $emit3/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b)' $indir/abixy -# -#touch $emit3/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b)' $indir/abixy 2> $emit3/err1 -#run_cat $emit3/err1 -# -#touch $emit3/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b)' $indir/abixy 2> $emit3/err2 -#run_cat $emit3/err2 -# -# -#emit4=$reloutdir/emit4 -#mkdir -p $emit4 -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emit4/out.ekspan -#run_cat $emit4/out.ekswye -#run_cat $emit4/out.panpan -#run_cat $emit4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emit4/out.ekspan -#run_cat $emit4/out.ekswye -#run_cat $emit4/out.panpan -#run_cat $emit4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emit4/out.ekspan -#run_cat $emit4/out.ekswye -#run_cat $emit4/out.panpan -#run_cat $emit4/out.wyewye -# -#run_mlr head -n 4 then put -q --ojson '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy -#run_cat $emit4/out.ekspan -#run_cat $emit4/out.ekswye -#run_cat $emit4/out.panpan -#run_cat $emit4/out.wyewye -# -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR"' $indir/abixy -# -#touch $emit4/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b), "NR"' $indir/abixy 2> $emit4/err1 -#run_cat $emit4/err1 -# -#touch $emit4/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b), "NR"' $indir/abixy 2> $emit4/err2 -#run_cat $emit4/err2 -# -# -#emit5=$reloutdir/emit5 -#mkdir -p $emit5 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit5'/out.".$a.$b, @*' $indir/abixy -#run_cat $emit5/out.ekspan -#run_cat $emit5/out.ekswye -#run_cat $emit5/out.panpan -#run_cat $emit5/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @*' $indir/abixy -# -#touch $emit5/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @*' $indir/abixy 2> $emit5/err1 -#run_cat $emit5/err1 -# -#touch $emit5/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @*' $indir/abixy 2> $emit5/err2 -#run_cat $emit5/err2 -# -# -#emit6=$reloutdir/emit6 -#mkdir -p $emit6 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit6'/out.".$a.$b, all' $indir/abixy -#run_cat $emit6/out.ekspan -#run_cat $emit6/out.ekswye -#run_cat $emit6/out.panpan -#run_cat $emit6/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all' $indir/abixy -# -#touch $emit6/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, all' $indir/abixy 2> $emit6/err1 -#run_cat $emit6/err1 -# -#touch $emit6/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, all' $indir/abixy 2> $emit6/err2 -#run_cat $emit6/err2 -# -# -#emit7=$reloutdir/emit7 -#mkdir -p $emit7 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit7'/out.".$a.$b, @*, "NR"' $indir/abixy -#run_cat $emit7/out.ekspan -#run_cat $emit7/out.ekswye -#run_cat $emit7/out.panpan -#run_cat $emit7/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @*, "NR"' $indir/abixy -# -#touch $emit7/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @*, "NR"' $indir/abixy 2> $emit7/err1 -#run_cat $emit7/err1 -# -#touch $emit7/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @*, "NR"' $indir/abixy 2> $emit7/err2 -#run_cat $emit7/err2 -# -# -#emit8=$reloutdir/emit8 -#mkdir -p $emit8 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit8'/out.".$a.$b, all, "NR"' $indir/abixy -#run_cat $emit8/out.ekspan -#run_cat $emit8/out.ekswye -#run_cat $emit8/out.panpan -#run_cat $emit8/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all, "NR"' $indir/abixy -# -#touch $emit8/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, all, "NR"' $indir/abixy 2> $emit8/err1 -#run_cat $emit8/err1 -# -#touch $emit8/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, all, "NR"' $indir/abixy 2> $emit8/err2 -#run_cat $emit8/err2 -# -# -#emit9=$reloutdir/emit9 -#mkdir -p $emit9 -#run_mlr head -n 4 then put -q 'emit > "'$emit9'/out.".$a.$b, $*' $indir/abixy -#run_cat $emit9/out.ekspan -#run_cat $emit9/out.ekswye -#run_cat $emit9/out.panpan -#run_cat $emit9/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", $*, "NR"' $indir/abixy -# -#touch $emit9/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, $*, "NR"' $indir/abixy 2> $emit9/err1 -#run_cat $emit9/err1 -# -#touch $emit9/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, $*, "NR"' $indir/abixy 2> $emit9/err2 -#run_cat $emit9/err2 -# -# -#emit10=$reloutdir/emit10 -#mkdir -p $emit10 -#run_mlr head -n 4 then put -q 'emit > "'$emit10'/out.".$a.$b, mapexcept($*, "a", "b")' $indir/abixy -#run_cat $emit10/out.ekspan -#run_cat $emit10/out.ekswye -#run_cat $emit10/out.panpan -#run_cat $emit10/out.wyewye -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", mapexcept($*, "a", "b"), "NR"' $indir/abixy -# -#touch $emit10/err1 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, mapexcept($*, "a", "b"), "NR"' $indir/abixy 2> $emit10/err1 -#run_cat $emit10/err1 -# -#touch $emit10/err2 -#run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, mapexcept($*, "a", "b"), "NR"' $indir/abixy 2> $emit10/err2 -#run_cat $emit10/err2 ## ---------------------------------------------------------------- #announce USER-DEFINED FUNCTIONS AND SUBROUTINES @@ -1191,225 +213,6 @@ # } #' -## ---------------------------------------------------------------- -#announce MAPVARS IN SCALAR FUNCTION-CALL CONTEXTS -# -#mlr_expect_fail --from $indir/abixy put '$z=strlen($*)' -#mlr_expect_fail --from $indir/abixy put '$z=strlen({})' -#run_mlr --from $indir/abixy put 'a={}; $z=strlen(a)' - -## ---------------------------------------------------------------- -#announce MAPVAR EMIT -# -#run_mlr -n put 'end { -# @a[2][3] = 4; -# b[2][3] = 8; -# emit (@a, b, {2:{3:12}}); -# emitp (@a, b, {2:{3:12}}); -# emit {}; -# emit (@a, b, {2:{3:12}}), "t"; -# emitp (@a, b, {2:{3:12}}), "t"; -# emit {}; -# emit (@a, b, {2:{3:12}}), "t", "u"; -# emitp (@a, b, {2:{3:12}}), "t", "u"; -#}' -# -#run_mlr -n put 'end { -# @a[2][3] = 4; -# b[2][3] = 8; -# emitp (@a, b, {2:{3:12}}); -# emit (@a, b, {2:{3:12}}); -# emit {}; -# emitp (@a, b, {2:{3:12}}), "t"; -# emit (@a, b, {2:{3:12}}), "t"; -# emit {}; -# emitp (@a, b, {2:{3:12}}), "t", "u"; -# emit (@a, b, {2:{3:12}}), "t", "u"; -#}' - -## ---------------------------------------------------------------- -#announce MAPVARS/UDFs/SUBROUTINES -# -#run_mlr --from $indir/abixy put ' -# func f(m) { -# dump m; -# sum = 0; -# for (k, v in m) { -# sum += k -# } -# return sum -# } -# @v[$i] = $a; -# $y = f(@v) -#' -# -#run_mlr --from $indir/abixy put ' -# subr s(m) { -# dump m; -# sum = 0; -# for (k, v in m) { -# sum += k -# } -# @sum = sum; -# } -# @v[$i] = $a; -# call s(@v); -# $y = @sum; -#' -# -#run_mlr --from $indir/abixy-het put 'func f(x) {return {"a":x,"b":x**2}}; map o = f($x); $* = o' -#run_mlr --from $indir/abixy-het put -q 'func f(x) {return x**2}; var z = f($x); dump z' -#run_mlr --from $indir/abixy-het put -q 'func f(x) {map m = {NR:x};return m}; z = f($y); dump z' -# -#mlr_expect_fail --from $indir/abixy put ' -# func f(int x): map { -# if (NR==2) { -# return 2 -# } else { -# return {} -# } -# } -# $y=f($x) -#' -# -#run_mlr --from $indir/abixy put ' -# func f(int x): map { -# if (NR==200) { -# return 2 -# } else { -# return {} -# } -# } -# $y=f($i) -#' -# -#mlr_expect_fail --from $indir/abixy put ' -# func f(int x): map { -# if (NR==200) { -# return 2 -# } else { -# return {} -# } -# } -# $y=f($x) -#' -# -#run_mlr --from $indir/abixy put ' -# func f(int x): var { -# if (NR==2) { -# return 2 -# } else { -# return {} -# } -# } -# $y=f($i) -#' -# -#mlr_expect_fail --from $indir/abixy put ' -# func f(int x): var { -# if (NR==2) { -# return 2 -# } else { -# return {} -# } -# } -# $y=f($x) -#' -# -#mlr_expect_fail --from $indir/abixy put ' -# func f(x): int { -# # fall-through return value is absent-null -# } -# $y=f($x) -#' -# -#mlr_expect_fail --from $indir/abixy put ' -# int a = 1; -# var b = a[2]; # cannot index localvar declared non-map -#' -# -## This one is intended to particularly look at freeing, e.g. with './reg_test/run --valgrind'. -#run_mlr --oxtab --from $indir/abixy-het put ' -# $* = mapdiff( -# mapsum($*, {"a": "newval"}), -# {"b": "nonesuch"}, -# ) -#' - -## ---------------------------------------------------------------- -#announce SPACE-PADDING -# -#run_mlr --idkvp --odkvp --ifs space --repifs cat $indir/space-pad.dkvp -#run_mlr --inidx --odkvp --ifs space --repifs cat $indir/space-pad.nidx -#run_mlr --icsvlite --odkvp --ifs space --repifs cat $indir/space-pad.pprint - -## ---------------------------------------------------------------- -#announce DOUBLE PS -# -#run_mlr --opprint cat $indir/double-ps.dkvp - -## ---------------------------------------------------------------- -#announce MISSING FINAL LF -# -#run_mlr --csvlite cat $indir/truncated.csv -#run_mlr --dkvp cat $indir/truncated.dkvp -#run_mlr --nidx cat $indir/truncated.nidx -#run_mlr --pprint cat $indir/truncated.pprint -#run_mlr --xtab cat $indir/truncated.xtab-crlf - -## ---------------------------------------------------------------- -#announce UTF-8 alignment -# -#run_mlr --icsvlite --opprint cat $indir/utf8-1.csv -#run_mlr --icsvlite --opprint cat $indir/utf8-2.csv -#run_mlr --icsvlite --oxtab cat $indir/utf8-1.csv -#run_mlr --icsvlite --oxtab cat $indir/utf8-2.csv -# -#run_mlr --inidx --ifs space --opprint cat $indir/utf8-align.nidx -#run_mlr --inidx --ifs space --opprint --right cat $indir/utf8-align.nidx -#run_mlr --oxtab cat $indir/utf8-align.dkvp -# -#run_mlr --inidx --ifs space --oxtab --xvright cat $indir/utf8-align.nidx - -## ---------------------------------------------------------------- -#announce UTF-8 BOM -# -#run_mlr --icsv --opprint cat $indir/bom.csv -#run_mlr --icsv --opprint cat < $indir/bom.csv -#run_mlr --icsv --opprint cat $indir/bom-dquote-header.csv -#run_mlr --icsv --opprint cat < $indir/bom-dquote-header.csv - -## ---------------------------------------------------------------- -#announce UTF-8 UPPERCASE/LOWERCASE -# -#run_mlr --icsvlite --opprint put '$langue = toupper($langue)' $indir/utf8-1.csv -#run_mlr --icsvlite --opprint put '$nom = toupper($nom)' $indir/utf8-1.csv -#run_mlr --icsvlite --opprint put '$jour = toupper($jour)' $indir/utf8-1.csv -# -#run_mlr --icsvlite --opprint put '$langue = capitalize($langue)' $indir/utf8-1.csv -#run_mlr --icsvlite --opprint put '$nom = capitalize($nom)' $indir/utf8-1.csv -#run_mlr --icsvlite --opprint put '$jour = capitalize($jour)' $indir/utf8-1.csv - -## ---------------------------------------------------------------- -#announce RAGGED NON-RFC CSV -# -#run_mlr --icsv --oxtab --ragged cat $indir/ragged.csv -#run_mlr --icsvlite --oxtab --ragged cat $indir/ragged.csv - -## ---------------------------------------------------------------- -#announce CSV/RS ENVIRONMENT DEFAULTS -# -#run_mlr --csv cut -f a $indir/rfc-csv/simple.csv-crlf -#run_mlr --csv --rs crlf cut -f a $indir/rfc-csv/simple.csv-crlf -#mlr_expect_fail --csv --rs lf cut -f a $indir/rfc-csv/simple.csv-crlf - -## ---------------------------------------------------------------- -#announce MULTI-CHARACTER IRS/IFS/IPS FOR DKVP -# -#run_mlr --oxtab --idkvp --irs lf --ifs , --ips = cut -o -f x,a,i $indir/multi-sep.dkvp-crlf -#run_mlr --oxtab --idkvp --irs lf --ifs /, --ips =: cut -o -f x,a,i $indir/multi-sep.dkvp-crlf -#run_mlr --oxtab --idkvp --irs crlf --ifs , --ips = cut -o -f x,a,i $indir/multi-sep.dkvp-crlf -#run_mlr --oxtab --idkvp --irs crlf --ifs /, --ips =: cut -o -f x,a,i $indir/multi-sep.dkvp-crlf ## ---------------------------------------------------------------- #announce MULTI-CHARACTER IRS/IFS FOR NIDX @@ -1444,3 +247,155 @@ # #run_mlr --pprint --irs crlf --ifs / --ofs @ cut -x -f b $indir/dots.pprint-crlf + +## ---------------------------------------------------------------- +#announce NON-INTERPOLATED AND INTERPOLATED PERCENTILES +# +#for k in 1 2 3 4 5 6 7 8 9 10 11; do +#run_mlr --from $indir/x0to10.dat --oxtab head -n $k then stats1 -f x -a p00,p01,p02,p03,p04,p05,p06,p07,p08,p09,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100 +#done +# +#for k in 1 2 3 4 5 6 7 8 9 10 11; do +#run_mlr --from $indir/x0to10.dat --oxtab head -n $k then stats1 -i -f x -a p00,p01,p02,p03,p04,p05,p06,p07,p08,p09,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96,p97,p98,p99,p100 +#done + + +## ---------------------------------------------------------------- +#announce MAPVAR EMIT +# +#run_mlr -n put 'end { +# @a[2][3] = 4; +# b[2][3] = 8; +# emit (@a, b, {2:{3:12}}); +# emitp (@a, b, {2:{3:12}}); +# emit {}; +# emit (@a, b, {2:{3:12}}), "t"; +# emitp (@a, b, {2:{3:12}}), "t"; +# emit {}; +# emit (@a, b, {2:{3:12}}), "t", "u"; +# emitp (@a, b, {2:{3:12}}), "t", "u"; +#}' +# +#run_mlr -n put 'end { +# @a[2][3] = 4; +# b[2][3] = 8; +# emitp (@a, b, {2:{3:12}}); +# emit (@a, b, {2:{3:12}}); +# emit {}; +# emitp (@a, b, {2:{3:12}}), "t"; +# emit (@a, b, {2:{3:12}}), "t"; +# emit {}; +# emitp (@a, b, {2:{3:12}}), "t", "u"; +# emit (@a, b, {2:{3:12}}), "t", "u"; +#}' + + +## ---------------------------------------------------------------- +#announce UTF-8 alignment +# +#run_mlr --icsvlite --opprint cat $indir/utf8-1.csv +#run_mlr --icsvlite --opprint cat $indir/utf8-2.csv +#run_mlr --icsvlite --oxtab cat $indir/utf8-1.csv +#run_mlr --icsvlite --oxtab cat $indir/utf8-2.csv +# +#run_mlr --inidx --ifs space --opprint cat $indir/utf8-align.nidx +#run_mlr --inidx --ifs space --opprint --right cat $indir/utf8-align.nidx +#run_mlr --oxtab cat $indir/utf8-align.dkvp +# +#run_mlr --inidx --ifs space --oxtab --xvright cat $indir/utf8-align.nidx + + +## ---------------------------------------------------------------- +#announce MULTI-CHARACTER IRS/IFS/IPS FOR DKVP +# +#run_mlr --oxtab --idkvp --irs lf --ifs , --ips = cut -o -f x,a,i $indir/multi-sep.dkvp-crlf +#run_mlr --oxtab --idkvp --irs lf --ifs /, --ips =: cut -o -f x,a,i $indir/multi-sep.dkvp-crlf +#run_mlr --oxtab --idkvp --irs crlf --ifs , --ips = cut -o -f x,a,i $indir/multi-sep.dkvp-crlf +#run_mlr --oxtab --idkvp --irs crlf --ifs /, --ips =: cut -o -f x,a,i $indir/multi-sep.dkvp-crlf + + +## Test early-out for unkeyed head +#run_mlr head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide +#run_mlr head -n 2 -g a then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide +#run_mlr cat then head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide +#run_mlr tac then head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide +#run_mlr head -n 2 then put 'end{ print "Final NR is ".NR}' $indir/abixy-wide $indir/abixy-wide $indir/abixy-wide + + +## ---------------------------------------------------------------- +#announce STATS1/STEP INT/FLOAT +# +#run_mlr --opprint step -a rsum,delta,counter -f x,y,z $indir/int-float.dkvp +#run_mlr --opprint step -F -a rsum,delta,counter -f x,y,z $indir/int-float.dkvp +#run_mlr --oxtab stats1 -a min,max,sum,count -f x,y,z $indir/int-float.dkvp +#run_mlr --oxtab stats1 -F -a min,max,sum,count -f x,y,z $indir/int-float.dkvp + + +## ---------------------------------------------------------------- +#announce DSL TYPED OVERLAY +# +#run_mlr put '$y = string($x); $z=$y.$y' $indir/int-float.dkvp +#run_mlr put '$z=string($x).string($x)' $indir/int-float.dkvp +#run_mlr put '$y = string($x)' then put '$z=$y.$y' $indir/int-float.dkvp +#run_mlr put '$a="hello"' then put '$b=$a." world";$z=$x+$y;$c=$b;$a=sub($b,"hello","farewell")' $indir/int-float.dkvp + + +## ---------------------------------------------------------------- +#announce MISSING FINAL LF +# +#run_mlr --csvlite cat $indir/truncated.csv +#run_mlr --dkvp cat $indir/truncated.dkvp +#run_mlr --nidx cat $indir/truncated.nidx +#run_mlr --pprint cat $indir/truncated.pprint +#run_mlr --xtab cat $indir/truncated.xtab-crlf + + +## ---------------------------------------------------------------- +#announce SPACE-PADDING +# +#run_mlr --idkvp --odkvp --ifs space --repifs cat $indir/space-pad.dkvp +#run_mlr --inidx --odkvp --ifs space --repifs cat $indir/space-pad.nidx +#run_mlr --icsvlite --odkvp --ifs space --repifs cat $indir/space-pad.pprint + + +## ---------------------------------------------------------------- +#announce CSV/RS ENVIRONMENT DEFAULTS +# +#run_mlr --csv cut -f a $indir/rfc-csv/simple.csv-crlf +#run_mlr --csv --rs crlf cut -f a $indir/rfc-csv/simple.csv-crlf +#mlr_expect_fail --csv --rs lf cut -f a $indir/rfc-csv/simple.csv-crlf + + +## ---------------------------------------------------------------- +#announce MAPVARS IN SCALAR FUNCTION-CALL CONTEXTS +# +#mlr_expect_fail --from $indir/abixy put '$z=strlen($*)' +#mlr_expect_fail --from $indir/abixy put '$z=strlen({})' +#run_mlr --from $indir/abixy put 'a={}; $z=strlen(a)' + + +## ---------------------------------------------------------------- +#announce MAP-VARIANT DUMPS +# +#run_mlr --from $indir/abixy-het put -q 'dump {"a"."b":$a.$b}' +#run_mlr --from $indir/abixy-het put -q 'func f(a, b) { return {"a"."b":a.b} } dump f($a, $b)' + + +## ---------------------------------------------------------------- +#announce UTF-8 STRLEN +# +#run_mlr --inidx --ifs comma --oxtab put '$s1=strlen($1);$s2=strlen($2);$s3=strlen($3);$s4=strlen($4)' $indir/utf8-align.dkvp + + +## ---------------------------------------------------------------- +#announce RAGGED NON-RFC CSV +# +#run_mlr --icsv --oxtab --ragged cat $indir/ragged.csv +#run_mlr --icsvlite --oxtab --ragged cat $indir/ragged.csv + + +## ---------------------------------------------------------------- +#announce DOUBLE PS +# +#run_mlr --opprint cat $indir/double-ps.dkvp + diff --git a/c/reg_test/case-dsl-mapvars-udfs-subroutines.sh b/c/reg_test/case-dsl-mapvars-udfs-subroutines.sh new file mode 100644 index 000000000..53285dfc2 --- /dev/null +++ b/c/reg_test/case-dsl-mapvars-udfs-subroutines.sh @@ -0,0 +1,105 @@ +run_mlr --from $indir/abixy put ' + func f(m) { + dump m; + sum = 0; + for (k, v in m) { + sum += k + } + return sum + } + @v[$i] = $a; + $y = f(@v) +' + +run_mlr --from $indir/abixy put ' + subr s(m) { + dump m; + sum = 0; + for (k, v in m) { + sum += k + } + @sum = sum; + } + @v[$i] = $a; + call s(@v); + $y = @sum; +' + +run_mlr --from $indir/abixy-het put 'func f(x) {return {"a":x,"b":x**2}}; map o = f($x); $* = o' +run_mlr --from $indir/abixy-het put -q 'func f(x) {return x**2}; var z = f($x); dump z' +run_mlr --from $indir/abixy-het put -q 'func f(x) {map m = {NR:x};return m}; z = f($y); dump z' + +mlr_expect_fail --from $indir/abixy put ' + func f(int x): map { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($x) +' + +run_mlr --from $indir/abixy put ' + func f(int x): map { + if (NR==200) { + return 2 + } else { + return {} + } + } + $y=f($i) +' + +mlr_expect_fail --from $indir/abixy put ' + func f(int x): map { + if (NR==200) { + return 2 + } else { + return {} + } + } + $y=f($x) +' + +run_mlr --from $indir/abixy put ' + func f(int x): var { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($i) +' + +mlr_expect_fail --from $indir/abixy put ' + func f(int x): var { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($x) +' + +mlr_expect_fail --from $indir/abixy put ' + func f(x): int { + # fall-through return value is absent-null + } + $y=f($x) +' + +mlr_expect_fail --from $indir/abixy put ' + int a = 1; + var b = a[2]; # cannot index localvar declared non-map +' + +# This one is intended to particularly look at freeing, e.g. with './reg_test/run --valgrind'. +run_mlr --oxtab --from $indir/abixy-het put ' + $* = mapdiff( + mapsum($*, {"a": "newval"}), + {"b": "nonesuch"}, + ) +' diff --git a/c/reg_test/case-dsl-oosvar-assignments.sh b/c/reg_test/case-dsl-oosvar-assignments.sh new file mode 100644 index 000000000..6519d0b09 --- /dev/null +++ b/c/reg_test/case-dsl-oosvar-assignments.sh @@ -0,0 +1,76 @@ +# ---------------------------------------------------------------- +announce OOSVAR-FROM-SREC ASSIGNMENT + +run_mlr put -v '@v = $*' /dev/null +run_mlr put -v '@v[1] = $*' /dev/null +run_mlr put -v '@v[$2] = $*' /dev/null +run_mlr put -v 'NR == 3 {@v = $*}' /dev/null +run_mlr put -v 'NR == 3 {@v[1] = $*}' /dev/null +run_mlr put -v 'NR == 3 {@v[$2] = $*}' /dev/null + +run_mlr --oxtab put -q '@v = $*; end {emitp @v }' $indir/abixy-het + +run_mlr --oxtab put -q '@v[$a] = $*; end {emitp @v }' $indir/abixy-het +run_mlr --oxtab put -q '@v[$a] = $*; end {emitp @v, "a" }' $indir/abixy-het + +run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v }' $indir/abixy-het +run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v, "a" }' $indir/abixy-het +run_mlr --oxtab put -q '@v[$a][$b] = $*; end {emitp @v, "a", "b"}' $indir/abixy-het + +# ---------------------------------------------------------------- +announce SREC-FROM-OOSVAR ASSIGNMENT + +run_mlr put -v '$* = @v ' /dev/null +run_mlr put -v '$* = @v[1] ' /dev/null +run_mlr put -v '$* = @v[$2]' /dev/null +run_mlr put -v 'NR == 3 {$* = @v }' /dev/null +run_mlr put -v 'NR == 3 {$* = @v[1] }' /dev/null +run_mlr put -v 'NR == 3 {$* = @v[$2]}' /dev/null + +run_mlr put '@v[NR] = $a; NR == 7 { @v = $*} ; $* = @v' $indir/abixy-het + +# ---------------------------------------------------------------- +announce OOSVAR-FROM-OOSVAR ASSIGNMENT + +run_mlr put -v '@u = @v' /dev/null +run_mlr put -v '@u = @v[1]' /dev/null +run_mlr put -v '@u[2] = @v' /dev/null +run_mlr put -v '@u[2] = @v[1]' /dev/null + +run_mlr put -v 'begin { @u = @v }' /dev/null +run_mlr put -v 'begin { @u = @v[1] }' /dev/null +run_mlr put -v 'begin { @u[2] = @v }' /dev/null +run_mlr put -v 'begin { @u[2] = @v[1] }' /dev/null + +run_mlr put -v 'NR == 3 { @u = @v }' /dev/null +run_mlr put -v 'NR == 3 { @u = @v[1] }' /dev/null +run_mlr put -v 'NR == 3 { @u[2] = @v }' /dev/null +run_mlr put -v 'NR == 3 { @u[2] = @v[1] }' /dev/null + +run_mlr put -v 'end { @u = @v }' /dev/null +run_mlr put -v 'end { @u = @v[1] }' /dev/null +run_mlr put -v 'end { @u[2] = @v }' /dev/null +run_mlr put -v 'end { @u[2] = @v[1] }' /dev/null + + +run_mlr put -q '@s += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr put -q '@s[1] += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr put -q '@s[1] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr put -q '@s[1][2] += $i; @t=@s; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr put -q '@s[1][2] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t[3]=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s[1]; end{dump; emitp@s; emitp @t}' $indir/abixy +run_mlr put -q '@s[1][2] += $i; @t[3][4]=@s[1][2]; end{dump; emitp@s; emitp @t}' $indir/abixy + +run_mlr --opprint put -q '@s[NR][NR] = $i/100; @t[NR*10]=@s; end{emitp@s,"A","B"; emitp @t,"C","D","E"}' $indir/abixy diff --git a/c/reg_test/case-dsl-prefixed-unprefixed-emit.sh b/c/reg_test/case-dsl-prefixed-unprefixed-emit.sh new file mode 100644 index 000000000..40e280b83 --- /dev/null +++ b/c/reg_test/case-dsl-prefixed-unprefixed-emit.sh @@ -0,0 +1,67 @@ +run_mlr --oxtab put -q '@sum += $x; end{dump;emitp @sum }' $indir/abixy-wide +run_mlr --oxtab put -q '@sum += $x; end{dump;emit @sum }' $indir/abixy-wide + + +run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emitp @sum }' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emit @sum }' $indir/abixy-wide + +run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide + + +run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emitp @sum }' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emit @sum }' $indir/abixy-wide + +run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a][$b] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide + +run_mlr --opprint put -q '@sum[$a][$b] += $x; end{dump;emitp @sum, "a", "b"}' $indir/abixy-wide +run_mlr --opprint put -q '@sum[$a][$b] += $x; end{dump;emit @sum, "a", "b"}' $indir/abixy-wide + + +run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum }' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum }' $indir/abixy-wide + +run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a"}' $indir/abixy-wide +run_mlr --oxtab put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a"}' $indir/abixy-wide + +run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b"}' $indir/abixy-wide +run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b"}' $indir/abixy-wide + +run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b", "ab"}' $indir/abixy-wide +run_mlr --opprint put -q '@sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b", "ab"}' $indir/abixy-wide + + + +run_mlr --oxtab head -n 2 then put -q '@v = $*; end{dump;emitp @v}' $indir/abixy +run_mlr --oxtab head -n 2 then put -q '@v = $*; end{dump;emit @v}' $indir/abixy + + +run_mlr --oxtab head -n 2 then put -q '@v[NR] = $*; end{dump;emitp @v }' $indir/abixy +run_mlr --oxtab head -n 2 then put -q '@v[NR] = $*; end{dump;emit @v }' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR] = $*; end{dump;emit @v, "I"}' $indir/abixy + + +run_mlr --oxtab head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v }' $indir/abixy +run_mlr --oxtab head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v }' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v, "I"}' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emitp @v, "I", "J"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR][NR] = $*; end{dump;emit @v, "I", "J"}' $indir/abixy + + +run_mlr --oxtab head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v }' $indir/abixy +run_mlr --oxtab head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v }' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I"}' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J"}' $indir/abixy + +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J", "K"}' $indir/abixy +run_mlr --opprint head -n 2 then put -q '@v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J", "K"}' $indir/abixy diff --git a/c/reg_test/case-dsl-redirects.sh b/c/reg_test/case-dsl-redirects.sh new file mode 100644 index 000000000..705538164 --- /dev/null +++ b/c/reg_test/case-dsl-redirects.sh @@ -0,0 +1,727 @@ +# ---------------------------------------------------------------- +announce MAPPER TEE REDIRECTS + +tee1=$reloutdir/tee1 +mkdir -p $tee1 + +run_mlr --from $indir/abixy tee $tee1/out then nothing +run_cat $tee1/out + +run_mlr --from $indir/abixy tee --no-fflush $tee1/out then nothing +run_cat $tee1/out + +run_mlr --from $indir/abixy tee -a $tee1/out then nothing +run_cat $tee1/out + +run_mlr --from $indir/abixy tee -o json $tee1/out then nothing +run_cat $tee1/out + +# ---------------------------------------------------------------- +announce DSL TEE REDIRECTS + +tee2=$reloutdir/tee2 +mkdir -p $tee2 + +run_mlr put -q 'tee > "'$tee2'/out.".$a, $*' $indir/abixy +run_cat $tee2/out.eks +run_cat $tee2/out.hat +run_cat $tee2/out.pan +run_cat $tee2/out.wye +run_cat $tee2/out.zee + +run_mlr put -q --no-fflush 'tee > "'$tee2'/out.".$a, $*' $indir/abixy +run_cat $tee2/out.eks +run_cat $tee2/out.hat +run_cat $tee2/out.pan +run_cat $tee2/out.wye +run_cat $tee2/out.zee + +run_mlr put -q 'tee >> "'$tee2'/out.".$a, $*' $indir/abixy +run_cat $tee2/out.eks +run_cat $tee2/out.hat +run_cat $tee2/out.pan +run_cat $tee2/out.wye +run_cat $tee2/out.zee + +run_mlr put -q -o json 'tee > "'$tee2'/out.".$a, $*' $indir/abixy +run_cat $tee2/out.eks +run_cat $tee2/out.hat +run_cat $tee2/out.pan +run_cat $tee2/out.wye +run_cat $tee2/out.zee + +run_mlr put -q 'tee | "tr \[a-z\] \[A-Z\]", $*' $indir/abixy + +run_mlr put -q -o json 'tee | "tr \[a-z\] \[A-Z\]", $*' $indir/abixy + +touch $tee2/err1 +run_mlr put -q 'tee > stdout, $*' $indir/abixy 2> $tee2/err1 +run_cat $tee2/err1 + +touch $tee2/err2 +run_mlr put -q 'tee > stderr, $*' $indir/abixy 2> $tee2/err2 +run_cat $tee2/err2 + +# ---------------------------------------------------------------- +announce DSL PRINT REDIRECTS + +print1=$reloutdir/print1 +mkdir -p $print1 + +run_mlr put -q 'print > "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $print1/out.eks +run_cat $print1/out.hat +run_cat $print1/out.pan +run_cat $print1/out.wye +run_cat $print1/out.zee + +run_mlr put -q 'print > "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $print1/out.eks +run_cat $print1/out.hat +run_cat $print1/out.pan +run_cat $print1/out.wye +run_cat $print1/out.zee + +run_mlr put -q 'print >> "'$print1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $print1/out.eks +run_cat $print1/out.hat +run_cat $print1/out.pan +run_cat $print1/out.wye +run_cat $print1/out.zee + +run_mlr put -q 'print | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i' $indir/abixy + +touch $print1/err1 +run_mlr put -q 'print > stdout, "abi:".$a.$b.$i' $indir/abixy 2> $print1/err1 +run_cat $print1/err1 + +touch $print1/err2 +run_mlr put -q 'print > stderr, "abi:".$a.$b.$i' $indir/abixy 2> $print1/err2 +run_cat $print1/err2 + +# ---------------------------------------------------------------- +announce DSL PRINTN REDIRECTS + +printn1=$reloutdir/printn1 +mkdir -p $printn1 + +run_mlr put -q 'printn > "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $printn1/out.eks +run_cat $printn1/out.hat +run_cat $printn1/out.pan +run_cat $printn1/out.wye +run_cat $printn1/out.zee + +run_mlr put -q 'printn > "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $printn1/out.eks +run_cat $printn1/out.hat +run_cat $printn1/out.pan +run_cat $printn1/out.wye +run_cat $printn1/out.zee + +run_mlr put -q 'printn >> "'$printn1'/out.".$a, "abi:".$a.$b.$i' $indir/abixy +run_cat $printn1/out.eks +run_cat $printn1/out.hat +run_cat $printn1/out.pan +run_cat $printn1/out.wye +run_cat $printn1/out.zee + +run_mlr put -q 'printn | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i' $indir/abixy + +touch $printn1/err1 +run_mlr put -q 'printn > stdout, "abi:".$a.$b.$i' $indir/abixy 2> $printn1/err1 +run_cat $printn1/err1 + +touch $printn1/err2 +run_mlr put -q 'printn > stderr, "abi:".$a.$b.$i' $indir/abixy 2> $printn1/err2 +run_cat $printn1/err2 + +# ---------------------------------------------------------------- +announce DSL DUMP REDIRECTS + +dump1=$reloutdir/dump1 +mkdir -p $dump1 + +run_mlr put -q '@v=$*; dump > "'$dump1'/out.".$a' $indir/abixy +run_cat $dump1/out.eks +run_cat $dump1/out.hat +run_cat $dump1/out.pan +run_cat $dump1/out.wye +run_cat $dump1/out.zee + +run_mlr put -q '@v=$*; dump > "'$dump1'/out.".$a' $indir/abixy +run_cat $dump1/out.eks +run_cat $dump1/out.hat +run_cat $dump1/out.pan +run_cat $dump1/out.wye +run_cat $dump1/out.zee + +run_mlr put -q '@v=$*; dump >> "'$dump1'/out.".$a' $indir/abixy +run_cat $dump1/out.eks +run_cat $dump1/out.hat +run_cat $dump1/out.pan +run_cat $dump1/out.wye +run_cat $dump1/out.zee + +run_mlr put -q '@v=$*; dump | "tr \[a-z\] \[A-Z\]"' $indir/abixy + +touch $dump1/err1 +run_mlr put -q '@v[NR] = $*; NR == 2 { dump > stdout }' $indir/abixy 2> $dump1/err1 +run_cat $dump1/err1 + +touch $dump1/err2 +run_mlr put -q '@v[NR] = $*; NR == 2 { dump > stderr }' $indir/abixy 2> $dump1/err2 +run_cat $dump1/err2 + +# ---------------------------------------------------------------- +announce DSL EMITF REDIRECTS + +emitf1=$reloutdir/emitf1 +mkdir -p $emitf1 + +run_mlr put -q '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy +run_cat $emitf1/out.ekspan +run_cat $emitf1/out.ekswye +run_cat $emitf1/out.ekszee +run_cat $emitf1/out.hatwye +run_cat $emitf1/out.panpan +run_cat $emitf1/out.panwye +run_cat $emitf1/out.wyepan +run_cat $emitf1/out.wyewye +run_cat $emitf1/out.zeepan +run_cat $emitf1/out.zeewye + +run_mlr put -q '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy +run_cat $emitf1/out.ekspan +run_cat $emitf1/out.ekswye +run_cat $emitf1/out.ekszee +run_cat $emitf1/out.hatwye +run_cat $emitf1/out.panpan +run_cat $emitf1/out.panwye +run_cat $emitf1/out.wyepan +run_cat $emitf1/out.wyewye +run_cat $emitf1/out.zeepan +run_cat $emitf1/out.zeewye + +run_mlr put -q '@a=$a; @b=$b; emitf >> "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy +run_cat $emitf1/out.ekspan +run_cat $emitf1/out.ekswye +run_cat $emitf1/out.ekszee +run_cat $emitf1/out.hatwye +run_cat $emitf1/out.panpan +run_cat $emitf1/out.panwye +run_cat $emitf1/out.wyepan +run_cat $emitf1/out.wyewye +run_cat $emitf1/out.zeepan +run_cat $emitf1/out.zeewye + +run_mlr put -q -o json '@a=$a; @b=$b; emitf > "'$emitf1'/out.".$a.$b, @a, @b' $indir/abixy +run_cat $emitf1/out.ekspan +run_cat $emitf1/out.ekswye +run_cat $emitf1/out.ekszee +run_cat $emitf1/out.hatwye +run_cat $emitf1/out.panpan +run_cat $emitf1/out.panwye +run_cat $emitf1/out.wyepan +run_cat $emitf1/out.wyewye +run_cat $emitf1/out.zeepan +run_cat $emitf1/out.zeewye + +run_mlr put -q '@a=$a; @b=$b; emitf | "tr \[a-z\] \[A-Z\]", @a, @b' $indir/abixy + +touch $emitf1/err1 +run_mlr put -q '@a=$a; @b=$b; emitf > stdout, @a, @b' $indir/abixy 2> $emitf1/err1 +run_cat $emitf1/err1 + +touch $emitf1/err2 +run_mlr put -q '@a=$a; @b=$b; emitf > stderr, @a, @b' $indir/abixy 2> $emitf1/err2 +run_cat $emitf1/err2 + +# ---------------------------------------------------------------- +announce DSL EMITP REDIRECTS + +emitp1=$reloutdir/emitp1 +mkdir -p $emitp1 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy +run_cat $emitp1/out.ekspan +run_cat $emitp1/out.ekswye +run_cat $emitp1/out.panpan +run_cat $emitp1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy +run_cat $emitp1/out.ekspan +run_cat $emitp1/out.ekswye +run_cat $emitp1/out.panpan +run_cat $emitp1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp1'/out.".$a.$b, @a' $indir/abixy +run_cat $emitp1/out.ekspan +run_cat $emitp1/out.ekswye +run_cat $emitp1/out.panpan +run_cat $emitp1/out.wyewye + +run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp1'/out.".$a.$b, @a' $indir/abixy +run_cat $emitp1/out.ekspan +run_cat $emitp1/out.ekswye +run_cat $emitp1/out.panpan +run_cat $emitp1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a' $indir/abixy + +touch $emitp1/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @a' $indir/abixy 2> $emitp1/err1 +run_cat $emitp1/err1 + +touch $emitp1/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @a' $indir/abixy 2> $emitp1/err2 +run_cat $emitp1/err2 + + +emitp2=$reloutdir/emitp2 +mkdir -p $emitp2 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emitp2/out.ekspan +run_cat $emitp2/out.ekswye +run_cat $emitp2/out.panpan +run_cat $emitp2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emitp2/out.ekspan +run_cat $emitp2/out.ekswye +run_cat $emitp2/out.panpan +run_cat $emitp2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emitp2/out.ekspan +run_cat $emitp2/out.ekswye +run_cat $emitp2/out.panpan +run_cat $emitp2/out.wyewye + +run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emitp2/out.ekspan +run_cat $emitp2/out.ekswye +run_cat $emitp2/out.panpan +run_cat $emitp2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a, "NR"' $indir/abixy + +touch $emitp2/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @a, "NR"' $indir/abixy 2> $emitp2/err1 +run_cat $emitp2/err1 + +touch $emitp2/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @a, "NR"' $indir/abixy 2> $emitp2/err2 +run_cat $emitp2/err2 + + +emitp3=$reloutdir/emitp3 +mkdir -p $emitp3 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emitp3/out.ekspan +run_cat $emitp3/out.ekswye +run_cat $emitp3/out.panpan +run_cat $emitp3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emitp3/out.ekspan +run_cat $emitp3/out.ekswye +run_cat $emitp3/out.panpan +run_cat $emitp3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emitp3/out.ekspan +run_cat $emitp3/out.ekswye +run_cat $emitp3/out.panpan +run_cat $emitp3/out.wyewye + +run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emitp3/out.ekspan +run_cat $emitp3/out.ekswye +run_cat $emitp3/out.panpan +run_cat $emitp3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b)' $indir/abixy + +touch $emitp3/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b)' $indir/abixy 2> $emitp3/err1 +run_cat $emitp3/err1 + +touch $emitp3/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b)' $indir/abixy 2> $emitp3/err2 +run_cat $emitp3/err2 + + +emitp4=$reloutdir/emitp4 +mkdir -p $emitp4 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emitp4/out.ekspan +run_cat $emitp4/out.ekswye +run_cat $emitp4/out.panpan +run_cat $emitp4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emitp4/out.ekspan +run_cat $emitp4/out.ekswye +run_cat $emitp4/out.panpan +run_cat $emitp4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp >> "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emitp4/out.ekspan +run_cat $emitp4/out.ekswye +run_cat $emitp4/out.panpan +run_cat $emitp4/out.wyewye + +run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emitp4/out.ekspan +run_cat $emitp4/out.ekswye +run_cat $emitp4/out.panpan +run_cat $emitp4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR"' $indir/abixy + +touch $emitp4/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b), "NR"' $indir/abixy 2> $emitp4/err1 +run_cat $emitp4/err1 + +touch $emitp4/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b), "NR"' $indir/abixy 2> $emitp4/err2 +run_cat $emitp4/err2 + + +emitp5=$reloutdir/emitp5 +mkdir -p $emitp5 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp5'/out.".$a.$b, @*' $indir/abixy +run_cat $emitp5/out.ekspan +run_cat $emitp5/out.ekswye +run_cat $emitp5/out.panpan +run_cat $emitp5/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @*' $indir/abixy + +touch $emitp5/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @*' $indir/abixy 2> $emitp5/err1 +run_cat $emitp5/err1 + +touch $emitp5/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @*' $indir/abixy 2> $emitp5/err2 +run_cat $emitp5/err2 + + +emitp6=$reloutdir/emitp6 +mkdir -p $emitp6 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp6'/out.".$a.$b, all' $indir/abixy +run_cat $emitp6/out.ekspan +run_cat $emitp6/out.ekswye +run_cat $emitp6/out.panpan +run_cat $emitp6/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all' $indir/abixy + +touch $emitp6/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, all' $indir/abixy 2> $emitp6/err1 +run_cat $emitp6/err1 + +touch $emitp6/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, all' $indir/abixy 2> $emitp6/err2 +run_cat $emitp6/err2 + + +emitp7=$reloutdir/emitp7 +mkdir -p $emitp7 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp7'/out.".$a.$b, @*, "NR"' $indir/abixy +run_cat $emitp7/out.ekspan +run_cat $emitp7/out.ekswye +run_cat $emitp7/out.panpan +run_cat $emitp7/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @*, "NR"' $indir/abixy + +touch $emitp7/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, @*, "NR"' $indir/abixy 2> $emitp7/err1 +run_cat $emitp7/err1 + +touch $emitp7/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, @*, "NR"' $indir/abixy 2> $emitp7/err2 +run_cat $emitp7/err2 + + +emitp8=$reloutdir/emitp8 +mkdir -p $emitp8 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > "'$emitp8'/out.".$a.$b, all, "NR"' $indir/abixy +run_cat $emitp8/out.ekspan +run_cat $emitp8/out.ekswye +run_cat $emitp8/out.panpan +run_cat $emitp8/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all, "NR"' $indir/abixy + +touch $emitp8/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stdout, all, "NR"' $indir/abixy 2> $emitp8/err1 +run_cat $emitp8/err1 + +touch $emitp8/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emitp > stderr, all, "NR"' $indir/abixy 2> $emitp8/err2 +run_cat $emitp8/err2 + + +# ---------------------------------------------------------------- +announce DSL EMIT REDIRECTS + +emit1=$reloutdir/emit1 +mkdir -p $emit1 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy +run_cat $emit1/out.ekspan +run_cat $emit1/out.ekswye +run_cat $emit1/out.panpan +run_cat $emit1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy +run_cat $emit1/out.ekspan +run_cat $emit1/out.ekswye +run_cat $emit1/out.panpan +run_cat $emit1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit1'/out.".$a.$b, @a' $indir/abixy +run_cat $emit1/out.ekspan +run_cat $emit1/out.ekswye +run_cat $emit1/out.panpan +run_cat $emit1/out.wyewye + +run_mlr head -n 4 then put -q -o json '@a[NR]=$a; @b[NR]=$b; emit > "'$emit1'/out.".$a.$b, @a' $indir/abixy +run_cat $emit1/out.ekspan +run_cat $emit1/out.ekswye +run_cat $emit1/out.panpan +run_cat $emit1/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a' $indir/abixy + +touch $emit1/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @a' $indir/abixy 2> $emit1/err1 +run_cat $emit1/err1 + +touch $emit1/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @a' $indir/abixy 2> $emit1/err2 +run_cat $emit1/err2 + + +emit2=$reloutdir/emit2 +mkdir -p $emit2 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emit2/out.ekspan +run_cat $emit2/out.ekswye +run_cat $emit2/out.panpan +run_cat $emit2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emit2/out.ekspan +run_cat $emit2/out.ekswye +run_cat $emit2/out.panpan +run_cat $emit2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emit2/out.ekspan +run_cat $emit2/out.ekswye +run_cat $emit2/out.panpan +run_cat $emit2/out.wyewye + +run_mlr head -n 4 then put -q -o pprint '@a[NR]=$a; @b[NR]=$b; emit > "'$emit2'/out.".$a.$b, @a, "NR"' $indir/abixy +run_cat $emit2/out.ekspan +run_cat $emit2/out.ekswye +run_cat $emit2/out.panpan +run_cat $emit2/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a, "NR"' $indir/abixy + +touch $emit2/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @a, "NR"' $indir/abixy 2> $emit2/err1 +run_cat $emit2/err1 + +touch $emit2/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @a, "NR"' $indir/abixy 2> $emit2/err2 +run_cat $emit2/err2 + + +emit3=$reloutdir/emit3 +mkdir -p $emit3 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emit3/out.ekspan +run_cat $emit3/out.ekswye +run_cat $emit3/out.panpan +run_cat $emit3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emit3/out.ekspan +run_cat $emit3/out.ekswye +run_cat $emit3/out.panpan +run_cat $emit3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emit3/out.ekspan +run_cat $emit3/out.ekswye +run_cat $emit3/out.panpan +run_cat $emit3/out.wyewye + +run_mlr head -n 4 then put -q --oxtab '@a[NR]=$a; @b[NR]=$b; emit > "'$emit3'/out.".$a.$b, (@a, @b)' $indir/abixy +run_cat $emit3/out.ekspan +run_cat $emit3/out.ekswye +run_cat $emit3/out.panpan +run_cat $emit3/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b)' $indir/abixy + +touch $emit3/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b)' $indir/abixy 2> $emit3/err1 +run_cat $emit3/err1 + +touch $emit3/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b)' $indir/abixy 2> $emit3/err2 +run_cat $emit3/err2 + + +emit4=$reloutdir/emit4 +mkdir -p $emit4 + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emit4/out.ekspan +run_cat $emit4/out.ekswye +run_cat $emit4/out.panpan +run_cat $emit4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emit4/out.ekspan +run_cat $emit4/out.ekswye +run_cat $emit4/out.panpan +run_cat $emit4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit >> "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emit4/out.ekspan +run_cat $emit4/out.ekswye +run_cat $emit4/out.panpan +run_cat $emit4/out.wyewye + +run_mlr head -n 4 then put -q --ojson '@a[NR]=$a; @b[NR]=$b; emit > "'$emit4'/out.".$a.$b, (@a, @b), "NR"' $indir/abixy +run_cat $emit4/out.ekspan +run_cat $emit4/out.ekswye +run_cat $emit4/out.panpan +run_cat $emit4/out.wyewye + +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR"' $indir/abixy + +touch $emit4/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b), "NR"' $indir/abixy 2> $emit4/err1 +run_cat $emit4/err1 + +touch $emit4/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b), "NR"' $indir/abixy 2> $emit4/err2 +run_cat $emit4/err2 + + +emit5=$reloutdir/emit5 +mkdir -p $emit5 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit5'/out.".$a.$b, @*' $indir/abixy +run_cat $emit5/out.ekspan +run_cat $emit5/out.ekswye +run_cat $emit5/out.panpan +run_cat $emit5/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @*' $indir/abixy + +touch $emit5/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @*' $indir/abixy 2> $emit5/err1 +run_cat $emit5/err1 + +touch $emit5/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @*' $indir/abixy 2> $emit5/err2 +run_cat $emit5/err2 + + +emit6=$reloutdir/emit6 +mkdir -p $emit6 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit6'/out.".$a.$b, all' $indir/abixy +run_cat $emit6/out.ekspan +run_cat $emit6/out.ekswye +run_cat $emit6/out.panpan +run_cat $emit6/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all' $indir/abixy + +touch $emit6/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, all' $indir/abixy 2> $emit6/err1 +run_cat $emit6/err1 + +touch $emit6/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, all' $indir/abixy 2> $emit6/err2 +run_cat $emit6/err2 + + +emit7=$reloutdir/emit7 +mkdir -p $emit7 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit7'/out.".$a.$b, @*, "NR"' $indir/abixy +run_cat $emit7/out.ekspan +run_cat $emit7/out.ekswye +run_cat $emit7/out.panpan +run_cat $emit7/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @*, "NR"' $indir/abixy + +touch $emit7/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, @*, "NR"' $indir/abixy 2> $emit7/err1 +run_cat $emit7/err1 + +touch $emit7/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, @*, "NR"' $indir/abixy 2> $emit7/err2 +run_cat $emit7/err2 + + +emit8=$reloutdir/emit8 +mkdir -p $emit8 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > "'$emit8'/out.".$a.$b, all, "NR"' $indir/abixy +run_cat $emit8/out.ekspan +run_cat $emit8/out.ekswye +run_cat $emit8/out.panpan +run_cat $emit8/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all, "NR"' $indir/abixy + +touch $emit8/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, all, "NR"' $indir/abixy 2> $emit8/err1 +run_cat $emit8/err1 + +touch $emit8/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, all, "NR"' $indir/abixy 2> $emit8/err2 +run_cat $emit8/err2 + + +emit9=$reloutdir/emit9 +mkdir -p $emit9 +run_mlr head -n 4 then put -q 'emit > "'$emit9'/out.".$a.$b, $*' $indir/abixy +run_cat $emit9/out.ekspan +run_cat $emit9/out.ekswye +run_cat $emit9/out.panpan +run_cat $emit9/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", $*, "NR"' $indir/abixy + +touch $emit9/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, $*, "NR"' $indir/abixy 2> $emit9/err1 +run_cat $emit9/err1 + +touch $emit9/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, $*, "NR"' $indir/abixy 2> $emit9/err2 +run_cat $emit9/err2 + + +emit10=$reloutdir/emit10 +mkdir -p $emit10 +run_mlr head -n 4 then put -q 'emit > "'$emit10'/out.".$a.$b, mapexcept($*, "a", "b")' $indir/abixy +run_cat $emit10/out.ekspan +run_cat $emit10/out.ekswye +run_cat $emit10/out.panpan +run_cat $emit10/out.wyewye +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", mapexcept($*, "a", "b"), "NR"' $indir/abixy + +touch $emit10/err1 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stdout, mapexcept($*, "a", "b"), "NR"' $indir/abixy 2> $emit10/err1 +run_cat $emit10/err1 + +touch $emit10/err2 +run_mlr head -n 4 then put -q '@a[NR]=$a; @b[NR]=$b; emit > stderr, mapexcept($*, "a", "b"), "NR"' $indir/abixy 2> $emit10/err2 +run_cat $emit10/err2 diff --git a/c/reg_test/case-dsl-scientific-notation.sh b/c/reg_test/case-dsl-scientific-notation.sh new file mode 100644 index 000000000..d41f40690 --- /dev/null +++ b/c/reg_test/case-dsl-scientific-notation.sh @@ -0,0 +1,34 @@ +# ---------------------------------------------------------------- +announce DSL SCIENTIFIC NOTATION IN FIELD VALUES + +run_mlr --opprint put '$y=$x+1' $indir/scinot.dkvp + +# ---------------------------------------------------------------- +announce DSL SCIENTIFIC NOTATION IN EXPRESSION LITERALS + +run_mlr --opprint put '$y = 123 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 123. + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 123.4 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = .234 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1e2 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1e-2 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1.2e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1.e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1.2e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1.e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = .2e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = .2e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = 1.e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -123 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -123. + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -123.4 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -.234 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1e2 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1e-2 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1.2e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1.e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1.2e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1.e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -.2e3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -.2e-3 + $i' $indir/scinot1.dkvp +run_mlr --opprint put '$y = -1.e-3 + $i' $indir/scinot1.dkvp diff --git a/c/reg_test/case-dsl-substr.sh b/c/reg_test/case-dsl-substr.sh new file mode 100644 index 000000000..b4dd1482b --- /dev/null +++ b/c/reg_test/case-dsl-substr.sh @@ -0,0 +1,18 @@ +run_mlr put -q ' + int n = strlen($x); + print "input= <<".$x.">>"; + for (i = -n-2; i <= n+2; i += 1) { + for (j = -n-2; j <= n+2; j += 1) { + print "i: ".fmtnum(i,"%3lld") + ." j:".fmtnum(j,"%3lld") + ." substr(".$x.",".fmtnum(i,"%3lld").",".fmtnum(j,"%3lld")."): <<" + .substr($x, i, j) .">>"; + } + print; +} +' << EOF +x= +x=o +x=o1 +x=o123456789 +EOF diff --git a/c/reg_test/case-dsl-utf8-uppercase-lowercase.sh b/c/reg_test/case-dsl-utf8-uppercase-lowercase.sh new file mode 100644 index 000000000..4a63bf0df --- /dev/null +++ b/c/reg_test/case-dsl-utf8-uppercase-lowercase.sh @@ -0,0 +1,7 @@ +run_mlr --icsvlite --opprint put '$langue = toupper($langue)' $indir/utf8-1.csv +run_mlr --icsvlite --opprint put '$nom = toupper($nom)' $indir/utf8-1.csv +run_mlr --icsvlite --opprint put '$jour = toupper($jour)' $indir/utf8-1.csv + +run_mlr --icsvlite --opprint put '$langue = capitalize($langue)' $indir/utf8-1.csv +run_mlr --icsvlite --opprint put '$nom = capitalize($nom)' $indir/utf8-1.csv +run_mlr --icsvlite --opprint put '$jour = capitalize($jour)' $indir/utf8-1.csv diff --git a/c/reg_test/case-utf8-bom.sh b/c/reg_test/case-utf8-bom.sh new file mode 100644 index 000000000..1531f4b14 --- /dev/null +++ b/c/reg_test/case-utf8-bom.sh @@ -0,0 +1,4 @@ +run_mlr --icsv --opprint cat $indir/bom.csv +run_mlr --icsv --opprint cat < $indir/bom.csv +run_mlr --icsv --opprint cat $indir/bom-dquote-header.csv +run_mlr --icsv --opprint cat < $indir/bom-dquote-header.csv diff --git a/c/reg_test/expected/case-dsl-mapvars-udfs-subroutines.sh.out b/c/reg_test/expected/case-dsl-mapvars-udfs-subroutines.sh.out new file mode 100644 index 000000000..04b8bc864 --- /dev/null +++ b/c/reg_test/expected/case-dsl-mapvars-udfs-subroutines.sh.out @@ -0,0 +1,406 @@ + +mlr --from ./reg_test/input/abixy put + func f(m) { + dump m; + sum = 0; + for (k, v in m) { + sum += k + } + return sum + } + @v[$i] = $a; + $y = f(@v) + +{ + "1": "pan" +} +a=pan,b=pan,i=1,x=0.3467901443380824,y=1 +{ + "1": "pan", + "2": "eks" +} +a=eks,b=pan,i=2,x=0.7586799647899636,y=3 +{ + "1": "pan", + "2": "eks", + "3": "wye" +} +a=wye,b=wye,i=3,x=0.20460330576630303,y=6 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks" +} +a=eks,b=wye,i=4,x=0.38139939387114097,y=10 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye" +} +a=wye,b=pan,i=5,x=0.5732889198020006,y=15 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee" +} +a=zee,b=pan,i=6,x=0.5271261600918548,y=21 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks" +} +a=eks,b=zee,i=7,x=0.6117840605678454,y=28 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee" +} +a=zee,b=wye,i=8,x=0.5985540091064224,y=36 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee", + "9": "hat" +} +a=hat,b=wye,i=9,x=0.03144187646093577,y=45 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee", + "9": "hat", + "10": "pan" +} +a=pan,b=wye,i=10,x=0.5026260055412137,y=55 + +mlr --from ./reg_test/input/abixy put + subr s(m) { + dump m; + sum = 0; + for (k, v in m) { + sum += k + } + @sum = sum; + } + @v[$i] = $a; + call s(@v); + $y = @sum; + +{ + "1": "pan" +} +a=pan,b=pan,i=1,x=0.3467901443380824,y=1 +{ + "1": "pan", + "2": "eks" +} +a=eks,b=pan,i=2,x=0.7586799647899636,y=3 +{ + "1": "pan", + "2": "eks", + "3": "wye" +} +a=wye,b=wye,i=3,x=0.20460330576630303,y=6 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks" +} +a=eks,b=wye,i=4,x=0.38139939387114097,y=10 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye" +} +a=wye,b=pan,i=5,x=0.5732889198020006,y=15 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee" +} +a=zee,b=pan,i=6,x=0.5271261600918548,y=21 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks" +} +a=eks,b=zee,i=7,x=0.6117840605678454,y=28 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee" +} +a=zee,b=wye,i=8,x=0.5985540091064224,y=36 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee", + "9": "hat" +} +a=hat,b=wye,i=9,x=0.03144187646093577,y=45 +{ + "1": "pan", + "2": "eks", + "3": "wye", + "4": "eks", + "5": "wye", + "6": "zee", + "7": "eks", + "8": "zee", + "9": "hat", + "10": "pan" +} +a=pan,b=wye,i=10,x=0.5026260055412137,y=55 + +mlr --from ./reg_test/input/abixy-het put func f(x) {return {"a":x,"b":x**2}}; map o = f($x); $* = o +a=0.346790,b=0.120263 +a=0.758680,b=0.575595 +a=0.204603,b=0.041863 +a=0.381399,b=0.145465 +a=,b= +a=0.527126,b=0.277862 +a=0.611784,b=0.374280 +a=0.598554,b=0.358267 +a=0.031442,b=0.000989 +a=0.502626,b=0.252633 + +mlr --from ./reg_test/input/abixy-het put -q func f(x) {return x**2}; var z = f($x); dump z +0.120263 +0.575595 +0.041863 +0.145465 + +0.277862 +0.374280 +0.358267 +0.000989 +0.252633 + +mlr --from ./reg_test/input/abixy-het put -q func f(x) {map m = {NR:x};return m}; z = f($y); dump z +{ + "1": 0.726803 +} +{ + "2": 0.522151 +} +{ + "3": 0.338319 +} +{ + "4": 0.134189 +} +{ + "5": 0.863624 +} +{ + "6": 0.493221 +} +{ + "7": 0.187885 +} +{ + "8": +} +{ + "9": 0.749551 +} +{ + "10": 0.952618 +} + +mlr --from ./reg_test/input/abixy put + func f(int x): map { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($x) + +mlr: int type assertion for variable x unmet by value 0.346790 with type float. + +mlr --from ./reg_test/input/abixy put + func f(int x): map { + if (NR==200) { + return 2 + } else { + return {} + } + } + $y=f($i) + +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --from ./reg_test/input/abixy put + func f(int x): map { + if (NR==200) { + return 2 + } else { + return {} + } + } + $y=f($x) + +mlr: int type assertion for variable x unmet by value 0.346790 with type float. + +mlr --from ./reg_test/input/abixy put + func f(int x): var { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($i) + +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=2 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --from ./reg_test/input/abixy put + func f(int x): var { + if (NR==2) { + return 2 + } else { + return {} + } + } + $y=f($x) + +mlr: int type assertion for variable x unmet by value 0.346790 with type float. + +mlr --from ./reg_test/input/abixy put + func f(x): int { + # fall-through return value is absent-null + } + $y=f($x) + +mlr: function f returned type absent, not matching typedecl int. + +mlr --from ./reg_test/input/abixy put + int a = 1; + var b = a[2]; # cannot index localvar declared non-map + +mlr: int type assertion for variable a unmet on read. + +mlr --oxtab --from ./reg_test/input/abixy-het put + $* = mapdiff( + mapsum($*, {"a": "newval"}), + {"b": "nonesuch"}, + ) + +a newval +i 1 +x 0.3467901443380824 +y 0.7268028627434533 + +a newval +i 2 +x 0.7586799647899636 +y 0.5221511083334797 + +aaa wye +i 3 +x 0.20460330576630303 +y 0.33831852551664776 +a newval + +a newval +bbb wye +i 4 +x 0.38139939387114097 +y 0.13418874328430463 + +a newval +i 5 +xxx 0.5732889198020006 +y 0.8636244699032729 + +a newval +i 6 +x 0.5271261600918548 +y 0.49322128674835697 + +a newval +iii 7 +x 0.6117840605678454 +y 0.1878849191181694 + +a newval +i 8 +x 0.5985540091064224 +yyy 0.976181385699006 + +aaa hat +bbb wye +i 9 +x 0.03144187646093577 +y 0.7495507603507059 +a newval + +a newval +i 10 +x 0.5026260055412137 +y 0.9526183602969864 + diff --git a/c/reg_test/expected/case-dsl-oosvar-assignments.sh.out b/c/reg_test/expected/case-dsl-oosvar-assignments.sh.out new file mode 100644 index 000000000..1f340720c --- /dev/null +++ b/c/reg_test/expected/case-dsl-oosvar-assignments.sh.out @@ -0,0 +1,1279 @@ + + +================================================================ +OOSVAR-FROM-SREC ASSIGNMENT + +mlr put -v @v = $* /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="$*", type=FULL_SREC. + + +mlr put -v @v[1] = $* /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + text="$*", type=FULL_SREC. + + +mlr put -v @v[$2] = $* /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + text="$*", type=FULL_SREC. + + +mlr put -v NR == 3 {@v = $*} /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="$*", type=FULL_SREC. + + +mlr put -v NR == 3 {@v[1] = $*} /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + text="$*", type=FULL_SREC. + + +mlr put -v NR == 3 {@v[$2] = $*} /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + text="$*", type=FULL_SREC. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_FROM_FULL_SREC_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + text="$*", type=FULL_SREC. + + +mlr --oxtab put -q @v = $*; end {emitp @v } ./reg_test/input/abixy-het +v:a pan +v:b wye +v:i 10 +v:x 0.5026260055412137 +v:y 0.9526183602969864 + +mlr --oxtab put -q @v[$a] = $*; end {emitp @v } ./reg_test/input/abixy-het +v:pan:a pan +v:pan:b wye +v:pan:i 10 +v:pan:x 0.5026260055412137 +v:pan:y 0.9526183602969864 +v:eks:a eks +v:eks:b zee +v:eks:iii 7 +v:eks:x 0.6117840605678454 +v:eks:y 0.1878849191181694 +v:wye:a wye +v:wye:b pan +v:wye:i 5 +v:wye:xxx 0.5732889198020006 +v:wye:y 0.8636244699032729 +v:zee:a zee +v:zee:b wye +v:zee:i 8 +v:zee:x 0.5985540091064224 +v:zee:yyy 0.976181385699006 + +mlr --oxtab put -q @v[$a] = $*; end {emitp @v, "a" } ./reg_test/input/abixy-het +a pan +v:a pan +v:b wye +v:i 10 +v:x 0.5026260055412137 +v:y 0.9526183602969864 + +a eks +v:a eks +v:b zee +v:iii 7 +v:x 0.6117840605678454 +v:y 0.1878849191181694 + +a wye +v:a wye +v:b pan +v:i 5 +v:xxx 0.5732889198020006 +v:y 0.8636244699032729 + +a zee +v:a zee +v:b wye +v:i 8 +v:x 0.5985540091064224 +v:yyy 0.976181385699006 + +mlr --oxtab put -q @v[$a][$b] = $*; end {emitp @v } ./reg_test/input/abixy-het +v:pan:pan:a pan +v:pan:pan:b pan +v:pan:pan:i 1 +v:pan:pan:x 0.3467901443380824 +v:pan:pan:y 0.7268028627434533 +v:pan:wye:a pan +v:pan:wye:b wye +v:pan:wye:i 10 +v:pan:wye:x 0.5026260055412137 +v:pan:wye:y 0.9526183602969864 +v:eks:pan:a eks +v:eks:pan:b pan +v:eks:pan:i 2 +v:eks:pan:x 0.7586799647899636 +v:eks:pan:y 0.5221511083334797 +v:eks:zee:a eks +v:eks:zee:b zee +v:eks:zee:iii 7 +v:eks:zee:x 0.6117840605678454 +v:eks:zee:y 0.1878849191181694 +v:wye:pan:a wye +v:wye:pan:b pan +v:wye:pan:i 5 +v:wye:pan:xxx 0.5732889198020006 +v:wye:pan:y 0.8636244699032729 +v:zee:pan:a zee +v:zee:pan:b pan +v:zee:pan:i 6 +v:zee:pan:x 0.5271261600918548 +v:zee:pan:y 0.49322128674835697 +v:zee:wye:a zee +v:zee:wye:b wye +v:zee:wye:i 8 +v:zee:wye:x 0.5985540091064224 +v:zee:wye:yyy 0.976181385699006 + +mlr --oxtab put -q @v[$a][$b] = $*; end {emitp @v, "a" } ./reg_test/input/abixy-het +a pan +v:pan:a pan +v:pan:b pan +v:pan:i 1 +v:pan:x 0.3467901443380824 +v:pan:y 0.7268028627434533 +v:wye:a pan +v:wye:b wye +v:wye:i 10 +v:wye:x 0.5026260055412137 +v:wye:y 0.9526183602969864 + +a eks +v:pan:a eks +v:pan:b pan +v:pan:i 2 +v:pan:x 0.7586799647899636 +v:pan:y 0.5221511083334797 +v:zee:a eks +v:zee:b zee +v:zee:iii 7 +v:zee:x 0.6117840605678454 +v:zee:y 0.1878849191181694 + +a wye +v:pan:a wye +v:pan:b pan +v:pan:i 5 +v:pan:xxx 0.5732889198020006 +v:pan:y 0.8636244699032729 + +a zee +v:pan:a zee +v:pan:b pan +v:pan:i 6 +v:pan:x 0.5271261600918548 +v:pan:y 0.49322128674835697 +v:wye:a zee +v:wye:b wye +v:wye:i 8 +v:wye:x 0.5985540091064224 +v:wye:yyy 0.976181385699006 + +mlr --oxtab put -q @v[$a][$b] = $*; end {emitp @v, "a", "b"} ./reg_test/input/abixy-het +a pan +b pan +v:a pan +v:b pan +v:i 1 +v:x 0.3467901443380824 +v:y 0.7268028627434533 + +a pan +b wye +v:a pan +v:b wye +v:i 10 +v:x 0.5026260055412137 +v:y 0.9526183602969864 + +a eks +b pan +v:a eks +v:b pan +v:i 2 +v:x 0.7586799647899636 +v:y 0.5221511083334797 + +a eks +b zee +v:a eks +v:b zee +v:iii 7 +v:x 0.6117840605678454 +v:y 0.1878849191181694 + +a wye +b pan +v:a wye +v:b pan +v:i 5 +v:xxx 0.5732889198020006 +v:y 0.8636244699032729 + +a zee +b pan +v:a zee +v:b pan +v:i 6 +v:x 0.5271261600918548 +v:y 0.49322128674835697 + +a zee +b wye +v:a zee +v:b wye +v:i 8 +v:x 0.5985540091064224 +v:yyy 0.976181385699006 + + +================================================================ +SREC-FROM-OOSVAR ASSIGNMENT + +mlr put -v $* = @v /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v $* = @v[1] /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v $* = @v[$2] /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + + +mlr put -v NR == 3 {$* = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v NR == 3 {$* = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v NR == 3 {$* = @v[$2]} /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=FULL_SREC_ASSIGNMENT: + text="$*", type=FULL_SREC. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="2", type=FIELD_NAME. + + +mlr put @v[NR] = $a; NR == 7 { @v = $*} ; $* = @v ./reg_test/input/abixy-het +1=pan +1=pan,2=eks +1=pan,2=eks +1=pan,2=eks,4=eks +1=pan,2=eks,4=eks,5=wye +1=pan,2=eks,4=eks,5=wye,6=zee +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694 +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,8=zee +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,8=zee +a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,8=zee,10=pan + + +================================================================ +OOSVAR-FROM-OOSVAR ASSIGNMENT + +mlr put -v @u = @v /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v @u = @v[1] /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v @u[2] = @v /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v @u[2] = @v[1] /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v begin { @u = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="begin", type=BEGIN: + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +BEGIN-BLOCK: +text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v begin { @u = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="begin", type=BEGIN: + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +BEGIN-BLOCK: +text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v begin { @u[2] = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="begin", type=BEGIN: + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +BEGIN-BLOCK: +text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v begin { @u[2] = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="begin", type=BEGIN: + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +BEGIN-BLOCK: +text="begin", type=BEGIN: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="begin_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v NR == 3 { @u = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v NR == 3 { @u = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v NR == 3 { @u[2] = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + + +mlr put -v NR == 3 { @u[2] = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=2 max_var_depth=1 + text="cond", type=CONDITIONAL_BLOCK: + text="==", type=OPERATOR: + text="NR", type=CONTEXT_VARIABLE. + text="3", type=NUMERIC_LITERAL. + text="cond_block", type=STATEMENT_BLOCK: subframe_var_count=0 + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + + +mlr put -v end { @u = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="end", type=END: + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +END-BLOCK: +text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v end { @u = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="end", type=END: + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +END-BLOCK: +text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v end { @u[2] = @v } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="end", type=END: + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +BLOCKED AST: + +END-BLOCK: +text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -v end { @u[2] = @v[1] } /dev/null +RAW AST: + +AST ROOT: +text="block", type=STATEMENT_BLOCK: + text="end", type=END: + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +BLOCKED AST: + +END-BLOCK: +text="end", type=END: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + text="end_block", type=STATEMENT_BLOCK: + text="=", type=OOSVAR_ASSIGNMENT: + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="u", type=STRING_LITERAL. + text="2", type=NUMERIC_LITERAL. + text="oosvar_keylist", type=OOSVAR_KEYLIST: + text="v", type=STRING_LITERAL. + text="1", type=NUMERIC_LITERAL. + +MAIN BLOCK: +text="main_block", type=STATEMENT_BLOCK: subframe_var_count=1 max_subframe_depth=1 max_var_depth=1 + + +mlr put -q @s += $i; @t=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": 55, + "t": 55 +} +s=55 +t=55 + +mlr put -q @s[1] += $i; @t=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": 55 + }, + "t": { + "1": 55 + } +} +s:1=55 +t:1=55 + +mlr put -q @s[1] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": 55 + }, + "t": 55 +} +s:1=55 +t=55 + +mlr put -q @s[1] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": 55 + }, + "t": { + "3": { + "1": 55 + } + } +} +s:1=55 +t:3:1=55 + +mlr put -q @s[1] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": 55 + }, + "t": { + "3": 55 + } +} +s:1=55 +t:3=55 + +mlr put -q @s[1][2] += $i; @t=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "1": { + "2": 55 + } + } +} +s:1:2=55 +t:1:2=55 + +mlr put -q @s[1][2] += $i; @t=@s[1]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "2": 55 + } +} +s:1:2=55 +t:2=55 + +mlr put -q @s[1][2] += $i; @t=@s[1][2]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": 55 +} +s:1:2=55 +t=55 + +mlr put -q @s[1][2] += $i; @t[3]=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": { + "1": { + "2": 55 + } + } + } +} +s:1:2=55 +t:3:1:2=55 + +mlr put -q @s[1][2] += $i; @t[3]=@s[1]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": { + "2": 55 + } + } +} +s:1:2=55 +t:3:2=55 + +mlr put -q @s[1][2] += $i; @t[3]=@s[1][2]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": 55 + } +} +s:1:2=55 +t:3=55 + +mlr put -q @s[1][2] += $i; @t[3][4]=@s; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": { + "4": { + "1": { + "2": 55 + } + } + } + } +} +s:1:2=55 +t:3:4:1:2=55 + +mlr put -q @s[1][2] += $i; @t[3][4]=@s[1]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": { + "4": { + "2": 55 + } + } + } +} +s:1:2=55 +t:3:4:2=55 + +mlr put -q @s[1][2] += $i; @t[3][4]=@s[1][2]; end{dump; emitp@s; emitp @t} ./reg_test/input/abixy +{ + "s": { + "1": { + "2": 55 + } + }, + "t": { + "3": { + "4": 55 + } + } +} +s:1:2=55 +t:3:4=55 + +mlr --opprint put -q @s[NR][NR] = $i/100; @t[NR*10]=@s; end{emitp@s,"A","B"; emitp @t,"C","D","E"} ./reg_test/input/abixy +A B s +1 1 0.010000 +2 2 0.020000 +3 3 0.030000 +4 4 0.040000 +5 5 0.050000 +6 6 0.060000 +7 7 0.070000 +8 8 0.080000 +9 9 0.090000 +10 10 0.100000 + +C D E t +10 1 1 0.010000 +20 1 1 0.010000 +20 2 2 0.020000 +30 1 1 0.010000 +30 2 2 0.020000 +30 3 3 0.030000 +40 1 1 0.010000 +40 2 2 0.020000 +40 3 3 0.030000 +40 4 4 0.040000 +50 1 1 0.010000 +50 2 2 0.020000 +50 3 3 0.030000 +50 4 4 0.040000 +50 5 5 0.050000 +60 1 1 0.010000 +60 2 2 0.020000 +60 3 3 0.030000 +60 4 4 0.040000 +60 5 5 0.050000 +60 6 6 0.060000 +70 1 1 0.010000 +70 2 2 0.020000 +70 3 3 0.030000 +70 4 4 0.040000 +70 5 5 0.050000 +70 6 6 0.060000 +70 7 7 0.070000 +80 1 1 0.010000 +80 2 2 0.020000 +80 3 3 0.030000 +80 4 4 0.040000 +80 5 5 0.050000 +80 6 6 0.060000 +80 7 7 0.070000 +80 8 8 0.080000 +90 1 1 0.010000 +90 2 2 0.020000 +90 3 3 0.030000 +90 4 4 0.040000 +90 5 5 0.050000 +90 6 6 0.060000 +90 7 7 0.070000 +90 8 8 0.080000 +90 9 9 0.090000 +100 1 1 0.010000 +100 2 2 0.020000 +100 3 3 0.030000 +100 4 4 0.040000 +100 5 5 0.050000 +100 6 6 0.060000 +100 7 7 0.070000 +100 8 8 0.080000 +100 9 9 0.090000 +100 10 10 0.100000 + diff --git a/c/reg_test/expected/case-dsl-prefixed-unprefixed-emit.sh.out b/c/reg_test/expected/case-dsl-prefixed-unprefixed-emit.sh.out new file mode 100644 index 000000000..5dfb7b498 --- /dev/null +++ b/c/reg_test/expected/case-dsl-prefixed-unprefixed-emit.sh.out @@ -0,0 +1,2210 @@ + +mlr --oxtab put -q @sum += $x; end{dump;emitp @sum } ./reg_test/input/abixy-wide +{ + "sum": 1009.118181 +} +sum 1009.118181 + +mlr --oxtab put -q @sum += $x; end{dump;emit @sum } ./reg_test/input/abixy-wide +{ + "sum": 1009.118181 +} +sum 1009.118181 + +mlr --oxtab put -q @sum[$a] += $x; end{dump;emitp @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": 207.843964, + "pan": 191.530740, + "wye": 188.110135, + "dog": 215.541519, + "hat": 206.091824 + } +} +sum:cat 207.843964 +sum:pan 191.530740 +sum:wye 188.110135 +sum:dog 215.541519 +sum:hat 206.091824 + +mlr --oxtab put -q @sum[$a] += $x; end{dump;emit @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": 207.843964, + "pan": 191.530740, + "wye": 188.110135, + "dog": 215.541519, + "hat": 206.091824 + } +} +cat 207.843964 +pan 191.530740 +wye 188.110135 +dog 215.541519 +hat 206.091824 + +mlr --oxtab put -q @sum[$a] += $x; end{dump;emitp @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": 207.843964, + "pan": 191.530740, + "wye": 188.110135, + "dog": 215.541519, + "hat": 206.091824 + } +} +a cat +sum 207.843964 + +a pan +sum 191.530740 + +a wye +sum 188.110135 + +a dog +sum 215.541519 + +a hat +sum 206.091824 + +mlr --oxtab put -q @sum[$a] += $x; end{dump;emit @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": 207.843964, + "pan": 191.530740, + "wye": 188.110135, + "dog": 215.541519, + "hat": 206.091824 + } +} +a cat +sum 207.843964 + +a pan +sum 191.530740 + +a wye +sum 188.110135 + +a dog +sum 215.541519 + +a hat +sum 206.091824 + +mlr --oxtab put -q @sum[$a][$b] += $x; end{dump;emitp @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +sum:cat:pan 42.327158 +sum:cat:hat 43.184410 +sum:cat:dog 39.241473 +sum:cat:wye 45.196775 +sum:cat:cat 37.894148 +sum:pan:wye 40.135300 +sum:pan:pan 36.226334 +sum:pan:hat 35.115869 +sum:pan:dog 37.817560 +sum:pan:cat 42.235677 +sum:wye:cat 40.805723 +sum:wye:hat 41.166697 +sum:wye:dog 40.619547 +sum:wye:wye 32.490973 +sum:wye:pan 33.027196 +sum:dog:hat 43.515162 +sum:dog:pan 45.614011 +sum:dog:dog 43.545956 +sum:dog:wye 37.223795 +sum:dog:cat 45.642595 +sum:hat:hat 48.058897 +sum:hat:wye 34.054270 +sum:hat:pan 42.538758 +sum:hat:cat 44.325655 +sum:hat:dog 37.114244 + +mlr --oxtab put -q @sum[$a][$b] += $x; end{dump;emit @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +pan 42.327158 +hat 43.184410 +dog 39.241473 +wye 45.196775 +cat 37.894148 + +wye 40.135300 +pan 36.226334 +hat 35.115869 +dog 37.817560 +cat 42.235677 + +cat 40.805723 +hat 41.166697 +dog 40.619547 +wye 32.490973 +pan 33.027196 + +hat 43.515162 +pan 45.614011 +dog 43.545956 +wye 37.223795 +cat 45.642595 + +hat 48.058897 +wye 34.054270 +pan 42.538758 +cat 44.325655 +dog 37.114244 + +mlr --oxtab put -q @sum[$a][$b] += $x; end{dump;emitp @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +a cat +sum:pan 42.327158 +sum:hat 43.184410 +sum:dog 39.241473 +sum:wye 45.196775 +sum:cat 37.894148 + +a pan +sum:wye 40.135300 +sum:pan 36.226334 +sum:hat 35.115869 +sum:dog 37.817560 +sum:cat 42.235677 + +a wye +sum:cat 40.805723 +sum:hat 41.166697 +sum:dog 40.619547 +sum:wye 32.490973 +sum:pan 33.027196 + +a dog +sum:hat 43.515162 +sum:pan 45.614011 +sum:dog 43.545956 +sum:wye 37.223795 +sum:cat 45.642595 + +a hat +sum:hat 48.058897 +sum:wye 34.054270 +sum:pan 42.538758 +sum:cat 44.325655 +sum:dog 37.114244 + +mlr --oxtab put -q @sum[$a][$b] += $x; end{dump;emit @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +a cat +pan 42.327158 +hat 43.184410 +dog 39.241473 +wye 45.196775 +cat 37.894148 + +a pan +wye 40.135300 +pan 36.226334 +hat 35.115869 +dog 37.817560 +cat 42.235677 + +a wye +cat 40.805723 +hat 41.166697 +dog 40.619547 +wye 32.490973 +pan 33.027196 + +a dog +hat 43.515162 +pan 45.614011 +dog 43.545956 +wye 37.223795 +cat 45.642595 + +a hat +hat 48.058897 +wye 34.054270 +pan 42.538758 +cat 44.325655 +dog 37.114244 + +mlr --opprint put -q @sum[$a][$b] += $x; end{dump;emitp @sum, "a", "b"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +a b sum +cat pan 42.327158 +cat hat 43.184410 +cat dog 39.241473 +cat wye 45.196775 +cat cat 37.894148 +pan wye 40.135300 +pan pan 36.226334 +pan hat 35.115869 +pan dog 37.817560 +pan cat 42.235677 +wye cat 40.805723 +wye hat 41.166697 +wye dog 40.619547 +wye wye 32.490973 +wye pan 33.027196 +dog hat 43.515162 +dog pan 45.614011 +dog dog 43.545956 +dog wye 37.223795 +dog cat 45.642595 +hat hat 48.058897 +hat wye 34.054270 +hat pan 42.538758 +hat cat 44.325655 +hat dog 37.114244 + +mlr --opprint put -q @sum[$a][$b] += $x; end{dump;emit @sum, "a", "b"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": 42.327158, + "hat": 43.184410, + "dog": 39.241473, + "wye": 45.196775, + "cat": 37.894148 + }, + "pan": { + "wye": 40.135300, + "pan": 36.226334, + "hat": 35.115869, + "dog": 37.817560, + "cat": 42.235677 + }, + "wye": { + "cat": 40.805723, + "hat": 41.166697, + "dog": 40.619547, + "wye": 32.490973, + "pan": 33.027196 + }, + "dog": { + "hat": 43.515162, + "pan": 45.614011, + "dog": 43.545956, + "wye": 37.223795, + "cat": 45.642595 + }, + "hat": { + "hat": 48.058897, + "wye": 34.054270, + "pan": 42.538758, + "cat": 44.325655, + "dog": 37.114244 + } + } +} +a b sum +cat pan 42.327158 +cat hat 43.184410 +cat dog 39.241473 +cat wye 45.196775 +cat cat 37.894148 +pan wye 40.135300 +pan pan 36.226334 +pan hat 35.115869 +pan dog 37.817560 +pan cat 42.235677 +wye cat 40.805723 +wye hat 41.166697 +wye dog 40.619547 +wye wye 32.490973 +wye pan 33.027196 +dog hat 43.515162 +dog pan 45.614011 +dog dog 43.545956 +dog wye 37.223795 +dog cat 45.642595 +hat hat 48.058897 +hat wye 34.054270 +hat pan 42.538758 +hat cat 44.325655 +hat dog 37.114244 + +mlr --oxtab put -q @sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +sum:cat:pan:catpan 42.327158 +sum:cat:hat:cathat 43.184410 +sum:cat:dog:catdog 39.241473 +sum:cat:wye:catwye 45.196775 +sum:cat:cat:catcat 37.894148 +sum:pan:wye:panwye 40.135300 +sum:pan:pan:panpan 36.226334 +sum:pan:hat:panhat 35.115869 +sum:pan:dog:pandog 37.817560 +sum:pan:cat:pancat 42.235677 +sum:wye:cat:wyecat 40.805723 +sum:wye:hat:wyehat 41.166697 +sum:wye:dog:wyedog 40.619547 +sum:wye:wye:wyewye 32.490973 +sum:wye:pan:wyepan 33.027196 +sum:dog:hat:doghat 43.515162 +sum:dog:pan:dogpan 45.614011 +sum:dog:dog:dogdog 43.545956 +sum:dog:wye:dogwye 37.223795 +sum:dog:cat:dogcat 45.642595 +sum:hat:hat:hathat 48.058897 +sum:hat:wye:hatwye 34.054270 +sum:hat:pan:hatpan 42.538758 +sum:hat:cat:hatcat 44.325655 +sum:hat:dog:hatdog 37.114244 + +mlr --oxtab put -q @sum[$a][$b][$a.$b] += $x; end{dump;emit @sum } ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +catpan 42.327158 + +cathat 43.184410 + +catdog 39.241473 + +catwye 45.196775 + +catcat 37.894148 + +panwye 40.135300 + +panpan 36.226334 + +panhat 35.115869 + +pandog 37.817560 + +pancat 42.235677 + +wyecat 40.805723 + +wyehat 41.166697 + +wyedog 40.619547 + +wyewye 32.490973 + +wyepan 33.027196 + +doghat 43.515162 + +dogpan 45.614011 + +dogdog 43.545956 + +dogwye 37.223795 + +dogcat 45.642595 + +hathat 48.058897 + +hatwye 34.054270 + +hatpan 42.538758 + +hatcat 44.325655 + +hatdog 37.114244 + +mlr --oxtab put -q @sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a cat +sum:pan:catpan 42.327158 +sum:hat:cathat 43.184410 +sum:dog:catdog 39.241473 +sum:wye:catwye 45.196775 +sum:cat:catcat 37.894148 + +a pan +sum:wye:panwye 40.135300 +sum:pan:panpan 36.226334 +sum:hat:panhat 35.115869 +sum:dog:pandog 37.817560 +sum:cat:pancat 42.235677 + +a wye +sum:cat:wyecat 40.805723 +sum:hat:wyehat 41.166697 +sum:dog:wyedog 40.619547 +sum:wye:wyewye 32.490973 +sum:pan:wyepan 33.027196 + +a dog +sum:hat:doghat 43.515162 +sum:pan:dogpan 45.614011 +sum:dog:dogdog 43.545956 +sum:wye:dogwye 37.223795 +sum:cat:dogcat 45.642595 + +a hat +sum:hat:hathat 48.058897 +sum:wye:hatwye 34.054270 +sum:pan:hatpan 42.538758 +sum:cat:hatcat 44.325655 +sum:dog:hatdog 37.114244 + +mlr --oxtab put -q @sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a cat +catpan 42.327158 + +a cat +cathat 43.184410 + +a cat +catdog 39.241473 + +a cat +catwye 45.196775 + +a cat +catcat 37.894148 + +a pan +panwye 40.135300 + +a pan +panpan 36.226334 + +a pan +panhat 35.115869 + +a pan +pandog 37.817560 + +a pan +pancat 42.235677 + +a wye +wyecat 40.805723 + +a wye +wyehat 41.166697 + +a wye +wyedog 40.619547 + +a wye +wyewye 32.490973 + +a wye +wyepan 33.027196 + +a dog +doghat 43.515162 + +a dog +dogpan 45.614011 + +a dog +dogdog 43.545956 + +a dog +dogwye 37.223795 + +a dog +dogcat 45.642595 + +a hat +hathat 48.058897 + +a hat +hatwye 34.054270 + +a hat +hatpan 42.538758 + +a hat +hatcat 44.325655 + +a hat +hatdog 37.114244 + +mlr --opprint put -q @sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a b sum:catpan +cat pan 42.327158 + +a b sum:cathat +cat hat 43.184410 + +a b sum:catdog +cat dog 39.241473 + +a b sum:catwye +cat wye 45.196775 + +a b sum:catcat +cat cat 37.894148 + +a b sum:panwye +pan wye 40.135300 + +a b sum:panpan +pan pan 36.226334 + +a b sum:panhat +pan hat 35.115869 + +a b sum:pandog +pan dog 37.817560 + +a b sum:pancat +pan cat 42.235677 + +a b sum:wyecat +wye cat 40.805723 + +a b sum:wyehat +wye hat 41.166697 + +a b sum:wyedog +wye dog 40.619547 + +a b sum:wyewye +wye wye 32.490973 + +a b sum:wyepan +wye pan 33.027196 + +a b sum:doghat +dog hat 43.515162 + +a b sum:dogpan +dog pan 45.614011 + +a b sum:dogdog +dog dog 43.545956 + +a b sum:dogwye +dog wye 37.223795 + +a b sum:dogcat +dog cat 45.642595 + +a b sum:hathat +hat hat 48.058897 + +a b sum:hatwye +hat wye 34.054270 + +a b sum:hatpan +hat pan 42.538758 + +a b sum:hatcat +hat cat 44.325655 + +a b sum:hatdog +hat dog 37.114244 + +mlr --opprint put -q @sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a b catpan +cat pan 42.327158 + +a b cathat +cat hat 43.184410 + +a b catdog +cat dog 39.241473 + +a b catwye +cat wye 45.196775 + +a b catcat +cat cat 37.894148 + +a b panwye +pan wye 40.135300 + +a b panpan +pan pan 36.226334 + +a b panhat +pan hat 35.115869 + +a b pandog +pan dog 37.817560 + +a b pancat +pan cat 42.235677 + +a b wyecat +wye cat 40.805723 + +a b wyehat +wye hat 41.166697 + +a b wyedog +wye dog 40.619547 + +a b wyewye +wye wye 32.490973 + +a b wyepan +wye pan 33.027196 + +a b doghat +dog hat 43.515162 + +a b dogpan +dog pan 45.614011 + +a b dogdog +dog dog 43.545956 + +a b dogwye +dog wye 37.223795 + +a b dogcat +dog cat 45.642595 + +a b hathat +hat hat 48.058897 + +a b hatwye +hat wye 34.054270 + +a b hatpan +hat pan 42.538758 + +a b hatcat +hat cat 44.325655 + +a b hatdog +hat dog 37.114244 + +mlr --opprint put -q @sum[$a][$b][$a.$b] += $x; end{dump;emitp @sum, "a", "b", "ab"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a b ab sum +cat pan catpan 42.327158 +cat hat cathat 43.184410 +cat dog catdog 39.241473 +cat wye catwye 45.196775 +cat cat catcat 37.894148 +pan wye panwye 40.135300 +pan pan panpan 36.226334 +pan hat panhat 35.115869 +pan dog pandog 37.817560 +pan cat pancat 42.235677 +wye cat wyecat 40.805723 +wye hat wyehat 41.166697 +wye dog wyedog 40.619547 +wye wye wyewye 32.490973 +wye pan wyepan 33.027196 +dog hat doghat 43.515162 +dog pan dogpan 45.614011 +dog dog dogdog 43.545956 +dog wye dogwye 37.223795 +dog cat dogcat 45.642595 +hat hat hathat 48.058897 +hat wye hatwye 34.054270 +hat pan hatpan 42.538758 +hat cat hatcat 44.325655 +hat dog hatdog 37.114244 + +mlr --opprint put -q @sum[$a][$b][$a.$b] += $x; end{dump;emit @sum, "a", "b", "ab"} ./reg_test/input/abixy-wide +{ + "sum": { + "cat": { + "pan": { + "catpan": 42.327158 + }, + "hat": { + "cathat": 43.184410 + }, + "dog": { + "catdog": 39.241473 + }, + "wye": { + "catwye": 45.196775 + }, + "cat": { + "catcat": 37.894148 + } + }, + "pan": { + "wye": { + "panwye": 40.135300 + }, + "pan": { + "panpan": 36.226334 + }, + "hat": { + "panhat": 35.115869 + }, + "dog": { + "pandog": 37.817560 + }, + "cat": { + "pancat": 42.235677 + } + }, + "wye": { + "cat": { + "wyecat": 40.805723 + }, + "hat": { + "wyehat": 41.166697 + }, + "dog": { + "wyedog": 40.619547 + }, + "wye": { + "wyewye": 32.490973 + }, + "pan": { + "wyepan": 33.027196 + } + }, + "dog": { + "hat": { + "doghat": 43.515162 + }, + "pan": { + "dogpan": 45.614011 + }, + "dog": { + "dogdog": 43.545956 + }, + "wye": { + "dogwye": 37.223795 + }, + "cat": { + "dogcat": 45.642595 + } + }, + "hat": { + "hat": { + "hathat": 48.058897 + }, + "wye": { + "hatwye": 34.054270 + }, + "pan": { + "hatpan": 42.538758 + }, + "cat": { + "hatcat": 44.325655 + }, + "dog": { + "hatdog": 37.114244 + } + } + } +} +a b ab sum +cat pan catpan 42.327158 +cat hat cathat 43.184410 +cat dog catdog 39.241473 +cat wye catwye 45.196775 +cat cat catcat 37.894148 +pan wye panwye 40.135300 +pan pan panpan 36.226334 +pan hat panhat 35.115869 +pan dog pandog 37.817560 +pan cat pancat 42.235677 +wye cat wyecat 40.805723 +wye hat wyehat 41.166697 +wye dog wyedog 40.619547 +wye wye wyewye 32.490973 +wye pan wyepan 33.027196 +dog hat doghat 43.515162 +dog pan dogpan 45.614011 +dog dog dogdog 43.545956 +dog wye dogwye 37.223795 +dog cat dogcat 45.642595 +hat hat hathat 48.058897 +hat wye hatwye 34.054270 +hat pan hatpan 42.538758 +hat cat hatcat 44.325655 +hat dog hatdog 37.114244 + +mlr --oxtab head -n 2 then put -q @v = $*; end{dump;emitp @v} ./reg_test/input/abixy +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +v:a eks +v:b pan +v:i 2 +v:x 0.7586799647899636 +v:y 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v = $*; end{dump;emit @v} ./reg_test/input/abixy +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +a eks +b pan +i 2 +x 0.7586799647899636 +y 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR] = $*; end{dump;emitp @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + }, + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } +} +v:1:a pan +v:1:b pan +v:1:i 1 +v:1:x 0.3467901443380824 +v:1:y 0.7268028627434533 +v:2:a eks +v:2:b pan +v:2:i 2 +v:2:x 0.7586799647899636 +v:2:y 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR] = $*; end{dump;emit @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + }, + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } +} +a pan +b pan +i 1 +x 0.3467901443380824 +y 0.7268028627434533 + +a eks +b pan +i 2 +x 0.7586799647899636 +y 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR] = $*; end{dump;emitp @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + }, + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } +} +I v:a v:b v:i v:x v:y +1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR] = $*; end{dump;emit @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + }, + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } +} +I a b i x y +1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR][NR] = $*; end{dump;emitp @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +v:1:1:a pan +v:1:1:b pan +v:1:1:i 1 +v:1:1:x 0.3467901443380824 +v:1:1:y 0.7268028627434533 +v:2:2:a eks +v:2:2:b pan +v:2:2:i 2 +v:2:2:x 0.7586799647899636 +v:2:2:y 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR][NR] = $*; end{dump;emit @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +a pan +b pan +i 1 +x 0.3467901443380824 +y 0.7268028627434533 + +a eks +b pan +i 2 +x 0.7586799647899636 +y 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR] = $*; end{dump;emitp @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +I v:1:a v:1:b v:1:i v:1:x v:1:y +1 pan pan 1 0.3467901443380824 0.7268028627434533 + +I v:2:a v:2:b v:2:i v:2:x v:2:y +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR] = $*; end{dump;emit @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +I a b i x y +1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR] = $*; end{dump;emitp @v, "I", "J"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +I J v:a v:b v:i v:x v:y +1 1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR] = $*; end{dump;emit @v, "I", "J"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + }, + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } +} +I J a b i x y +1 1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emitp @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +v:1:1:1:a pan +v:1:1:1:b pan +v:1:1:1:i 1 +v:1:1:1:x 0.3467901443380824 +v:1:1:1:y 0.7268028627434533 +v:2:2:2:a eks +v:2:2:2:b pan +v:2:2:2:i 2 +v:2:2:2:x 0.7586799647899636 +v:2:2:2:y 0.5221511083334797 + +mlr --oxtab head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emit @v } ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +a pan +b pan +i 1 +x 0.3467901443380824 +y 0.7268028627434533 + +a eks +b pan +i 2 +x 0.7586799647899636 +y 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emitp @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I v:1:1:a v:1:1:b v:1:1:i v:1:1:x v:1:1:y +1 pan pan 1 0.3467901443380824 0.7268028627434533 + +I v:2:2:a v:2:2:b v:2:2:i v:2:2:x v:2:2:y +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emit @v, "I"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I a b i x y +1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I J v:1:a v:1:b v:1:i v:1:x v:1:y +1 1 pan pan 1 0.3467901443380824 0.7268028627434533 + +I J v:2:a v:2:b v:2:i v:2:x v:2:y +2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I J a b i x y +1 1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emitp @v, "I", "J", "K"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I J K v:a v:b v:i v:x v:y +1 1 1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr --opprint head -n 2 then put -q @v[NR][NR][NR] = $*; end{dump;emit @v, "I", "J", "K"} ./reg_test/input/abixy +{ + "v": { + "1": { + "1": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } + } + }, + "2": { + "2": { + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } + } + } +} +I J K a b i x y +1 1 1 pan pan 1 0.3467901443380824 0.7268028627434533 +2 2 2 eks pan 2 0.7586799647899636 0.5221511083334797 + diff --git a/c/reg_test/expected/case-dsl-redirects.sh.out b/c/reg_test/expected/case-dsl-redirects.sh.out new file mode 100644 index 000000000..ee6d4e78e --- /dev/null +++ b/c/reg_test/expected/case-dsl-redirects.sh.out @@ -0,0 +1,2451 @@ + + +================================================================ +MAPPER TEE REDIRECTS + +mlr --from ./reg_test/input/abixy tee ./output-regtest/tee1/out then nothing + +cat ./output-regtest/tee1/out +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --from ./reg_test/input/abixy tee --no-fflush ./output-regtest/tee1/out then nothing + +cat ./output-regtest/tee1/out +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --from ./reg_test/input/abixy tee -a ./output-regtest/tee1/out then nothing + +cat ./output-regtest/tee1/out +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr --from ./reg_test/input/abixy tee -o json ./output-regtest/tee1/out then nothing + +cat ./output-regtest/tee1/out +{ "a": "pan", "b": "pan", "i": 1, "x": 0.3467901443380824, "y": 0.7268028627434533 } +{ "a": "eks", "b": "pan", "i": 2, "x": 0.7586799647899636, "y": 0.5221511083334797 } +{ "a": "wye", "b": "wye", "i": 3, "x": 0.20460330576630303, "y": 0.33831852551664776 } +{ "a": "eks", "b": "wye", "i": 4, "x": 0.38139939387114097, "y": 0.13418874328430463 } +{ "a": "wye", "b": "pan", "i": 5, "x": 0.5732889198020006, "y": 0.8636244699032729 } +{ "a": "zee", "b": "pan", "i": 6, "x": 0.5271261600918548, "y": 0.49322128674835697 } +{ "a": "eks", "b": "zee", "i": 7, "x": 0.6117840605678454, "y": 0.1878849191181694 } +{ "a": "zee", "b": "wye", "i": 8, "x": 0.5985540091064224, "y": 0.976181385699006 } +{ "a": "hat", "b": "wye", "i": 9, "x": 0.03144187646093577, "y": 0.7495507603507059 } +{ "a": "pan", "b": "wye", "i": 10, "x": 0.5026260055412137, "y": 0.9526183602969864 } + + +================================================================ +DSL TEE REDIRECTS + +mlr put -q tee > "./output-regtest/tee2/out.".$a, $* ./reg_test/input/abixy + +cat ./output-regtest/tee2/out.eks +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 + +cat ./output-regtest/tee2/out.hat +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 + +cat ./output-regtest/tee2/out.pan +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +cat ./output-regtest/tee2/out.wye +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 + +cat ./output-regtest/tee2/out.zee +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 + +mlr put -q --no-fflush tee > "./output-regtest/tee2/out.".$a, $* ./reg_test/input/abixy + +cat ./output-regtest/tee2/out.eks +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 + +cat ./output-regtest/tee2/out.hat +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 + +cat ./output-regtest/tee2/out.pan +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +cat ./output-regtest/tee2/out.wye +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 + +cat ./output-regtest/tee2/out.zee +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 + +mlr put -q tee >> "./output-regtest/tee2/out.".$a, $* ./reg_test/input/abixy + +cat ./output-regtest/tee2/out.eks +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 + +cat ./output-regtest/tee2/out.hat +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 + +cat ./output-regtest/tee2/out.pan +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +cat ./output-regtest/tee2/out.wye +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 + +cat ./output-regtest/tee2/out.zee +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 + +mlr put -q -o json tee > "./output-regtest/tee2/out.".$a, $* ./reg_test/input/abixy + +cat ./output-regtest/tee2/out.eks +{ "a": "eks", "b": "pan", "i": 2, "x": 0.7586799647899636, "y": 0.5221511083334797 } +{ "a": "eks", "b": "wye", "i": 4, "x": 0.38139939387114097, "y": 0.13418874328430463 } +{ "a": "eks", "b": "zee", "i": 7, "x": 0.6117840605678454, "y": 0.1878849191181694 } + +cat ./output-regtest/tee2/out.hat +{ "a": "hat", "b": "wye", "i": 9, "x": 0.03144187646093577, "y": 0.7495507603507059 } + +cat ./output-regtest/tee2/out.pan +{ "a": "pan", "b": "pan", "i": 1, "x": 0.3467901443380824, "y": 0.7268028627434533 } +{ "a": "pan", "b": "wye", "i": 10, "x": 0.5026260055412137, "y": 0.9526183602969864 } + +cat ./output-regtest/tee2/out.wye +{ "a": "wye", "b": "wye", "i": 3, "x": 0.20460330576630303, "y": 0.33831852551664776 } +{ "a": "wye", "b": "pan", "i": 5, "x": 0.5732889198020006, "y": 0.8636244699032729 } + +cat ./output-regtest/tee2/out.zee +{ "a": "zee", "b": "pan", "i": 6, "x": 0.5271261600918548, "y": 0.49322128674835697 } +{ "a": "zee", "b": "wye", "i": 8, "x": 0.5985540091064224, "y": 0.976181385699006 } + +mlr put -q tee | "tr \[a-z\] \[A-Z\]", $* ./reg_test/input/abixy +A=PAN,B=PAN,I=1,X=0.3467901443380824,Y=0.7268028627434533 +A=EKS,B=PAN,I=2,X=0.7586799647899636,Y=0.5221511083334797 +A=WYE,B=WYE,I=3,X=0.20460330576630303,Y=0.33831852551664776 +A=EKS,B=WYE,I=4,X=0.38139939387114097,Y=0.13418874328430463 +A=WYE,B=PAN,I=5,X=0.5732889198020006,Y=0.8636244699032729 +A=ZEE,B=PAN,I=6,X=0.5271261600918548,Y=0.49322128674835697 +A=EKS,B=ZEE,I=7,X=0.6117840605678454,Y=0.1878849191181694 +A=ZEE,B=WYE,I=8,X=0.5985540091064224,Y=0.976181385699006 +A=HAT,B=WYE,I=9,X=0.03144187646093577,Y=0.7495507603507059 +A=PAN,B=WYE,I=10,X=0.5026260055412137,Y=0.9526183602969864 + +mlr put -q -o json tee | "tr \[a-z\] \[A-Z\]", $* ./reg_test/input/abixy +{ "A": "PAN", "B": "PAN", "I": 1, "X": 0.3467901443380824, "Y": 0.7268028627434533 } +{ "A": "EKS", "B": "PAN", "I": 2, "X": 0.7586799647899636, "Y": 0.5221511083334797 } +{ "A": "WYE", "B": "WYE", "I": 3, "X": 0.20460330576630303, "Y": 0.33831852551664776 } +{ "A": "EKS", "B": "WYE", "I": 4, "X": 0.38139939387114097, "Y": 0.13418874328430463 } +{ "A": "WYE", "B": "PAN", "I": 5, "X": 0.5732889198020006, "Y": 0.8636244699032729 } +{ "A": "ZEE", "B": "PAN", "I": 6, "X": 0.5271261600918548, "Y": 0.49322128674835697 } +{ "A": "EKS", "B": "ZEE", "I": 7, "X": 0.6117840605678454, "Y": 0.1878849191181694 } +{ "A": "ZEE", "B": "WYE", "I": 8, "X": 0.5985540091064224, "Y": 0.976181385699006 } +{ "A": "HAT", "B": "WYE", "I": 9, "X": 0.03144187646093577, "Y": 0.7495507603507059 } +{ "A": "PAN", "B": "WYE", "I": 10, "X": 0.5026260055412137, "Y": 0.9526183602969864 } + +mlr put -q tee > stdout, $* ./reg_test/input/abixy +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +cat ./output-regtest/tee2/err1 + +mlr put -q tee > stderr, $* ./reg_test/input/abixy + +cat ./output-regtest/tee2/err2 + + +================================================================ +DSL PRINT REDIRECTS + +mlr put -q print > "./output-regtest/print1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/print1/out.eks +abi:ekspan2 +abi:ekswye4 +abi:ekszee7 + +cat ./output-regtest/print1/out.hat +abi:hatwye9 + +cat ./output-regtest/print1/out.pan +abi:panpan1 +abi:panwye10 + +cat ./output-regtest/print1/out.wye +abi:wyewye3 +abi:wyepan5 + +cat ./output-regtest/print1/out.zee +abi:zeepan6 +abi:zeewye8 + +mlr put -q print > "./output-regtest/print1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/print1/out.eks +abi:ekspan2 +abi:ekswye4 +abi:ekszee7 + +cat ./output-regtest/print1/out.hat +abi:hatwye9 + +cat ./output-regtest/print1/out.pan +abi:panpan1 +abi:panwye10 + +cat ./output-regtest/print1/out.wye +abi:wyewye3 +abi:wyepan5 + +cat ./output-regtest/print1/out.zee +abi:zeepan6 +abi:zeewye8 + +mlr put -q print >> "./output-regtest/print1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/print1/out.eks +abi:ekspan2 +abi:ekswye4 +abi:ekszee7 +abi:ekspan2 +abi:ekswye4 +abi:ekszee7 + +cat ./output-regtest/print1/out.hat +abi:hatwye9 +abi:hatwye9 + +cat ./output-regtest/print1/out.pan +abi:panpan1 +abi:panwye10 +abi:panpan1 +abi:panwye10 + +cat ./output-regtest/print1/out.wye +abi:wyewye3 +abi:wyepan5 +abi:wyewye3 +abi:wyepan5 + +cat ./output-regtest/print1/out.zee +abi:zeepan6 +abi:zeewye8 +abi:zeepan6 +abi:zeewye8 + +mlr put -q print | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i ./reg_test/input/abixy +ABI:PANPAN1 +ABI:EKSPAN2 +ABI:WYEWYE3 +ABI:EKSWYE4 +ABI:WYEPAN5 +ABI:ZEEPAN6 +ABI:EKSZEE7 +ABI:ZEEWYE8 +ABI:HATWYE9 +ABI:PANWYE10 + +mlr put -q print > stdout, "abi:".$a.$b.$i ./reg_test/input/abixy +abi:panpan1 +abi:ekspan2 +abi:wyewye3 +abi:ekswye4 +abi:wyepan5 +abi:zeepan6 +abi:ekszee7 +abi:zeewye8 +abi:hatwye9 +abi:panwye10 + +cat ./output-regtest/print1/err1 + +mlr put -q print > stderr, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/print1/err2 + + +================================================================ +DSL PRINTN REDIRECTS + +mlr put -q printn > "./output-regtest/printn1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/printn1/out.eks +abi:ekspan2abi:ekswye4abi:ekszee7 +cat ./output-regtest/printn1/out.hat +abi:hatwye9 +cat ./output-regtest/printn1/out.pan +abi:panpan1abi:panwye10 +cat ./output-regtest/printn1/out.wye +abi:wyewye3abi:wyepan5 +cat ./output-regtest/printn1/out.zee +abi:zeepan6abi:zeewye8 +mlr put -q printn > "./output-regtest/printn1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/printn1/out.eks +abi:ekspan2abi:ekswye4abi:ekszee7 +cat ./output-regtest/printn1/out.hat +abi:hatwye9 +cat ./output-regtest/printn1/out.pan +abi:panpan1abi:panwye10 +cat ./output-regtest/printn1/out.wye +abi:wyewye3abi:wyepan5 +cat ./output-regtest/printn1/out.zee +abi:zeepan6abi:zeewye8 +mlr put -q printn >> "./output-regtest/printn1/out.".$a, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/printn1/out.eks +abi:ekspan2abi:ekswye4abi:ekszee7abi:ekspan2abi:ekswye4abi:ekszee7 +cat ./output-regtest/printn1/out.hat +abi:hatwye9abi:hatwye9 +cat ./output-regtest/printn1/out.pan +abi:panpan1abi:panwye10abi:panpan1abi:panwye10 +cat ./output-regtest/printn1/out.wye +abi:wyewye3abi:wyepan5abi:wyewye3abi:wyepan5 +cat ./output-regtest/printn1/out.zee +abi:zeepan6abi:zeewye8abi:zeepan6abi:zeewye8 +mlr put -q printn | "tr \[a-z\] \[A-Z\]", "abi:".$a.$b.$i ./reg_test/input/abixy +ABI:PANPAN1ABI:EKSPAN2ABI:WYEWYE3ABI:EKSWYE4ABI:WYEPAN5ABI:ZEEPAN6ABI:EKSZEE7ABI:ZEEWYE8ABI:HATWYE9ABI:PANWYE10 +mlr put -q printn > stdout, "abi:".$a.$b.$i ./reg_test/input/abixy +abi:panpan1abi:ekspan2abi:wyewye3abi:ekswye4abi:wyepan5abi:zeepan6abi:ekszee7abi:zeewye8abi:hatwye9abi:panwye10 +cat ./output-regtest/printn1/err1 + +mlr put -q printn > stderr, "abi:".$a.$b.$i ./reg_test/input/abixy + +cat ./output-regtest/printn1/err2 + + +================================================================ +DSL DUMP REDIRECTS + +mlr put -q @v=$*; dump > "./output-regtest/dump1/out.".$a ./reg_test/input/abixy + +cat ./output-regtest/dump1/out.eks +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +{ + "v": { + "a": "eks", + "b": "wye", + "i": 4, + "x": 0.38139939387114097, + "y": 0.13418874328430463 + } +} +{ + "v": { + "a": "eks", + "b": "zee", + "i": 7, + "x": 0.6117840605678454, + "y": 0.1878849191181694 + } +} + +cat ./output-regtest/dump1/out.hat +{ + "v": { + "a": "hat", + "b": "wye", + "i": 9, + "x": 0.03144187646093577, + "y": 0.7495507603507059 + } +} + +cat ./output-regtest/dump1/out.pan +{ + "v": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } +} +{ + "v": { + "a": "pan", + "b": "wye", + "i": 10, + "x": 0.5026260055412137, + "y": 0.9526183602969864 + } +} + +cat ./output-regtest/dump1/out.wye +{ + "v": { + "a": "wye", + "b": "wye", + "i": 3, + "x": 0.20460330576630303, + "y": 0.33831852551664776 + } +} +{ + "v": { + "a": "wye", + "b": "pan", + "i": 5, + "x": 0.5732889198020006, + "y": 0.8636244699032729 + } +} + +cat ./output-regtest/dump1/out.zee +{ + "v": { + "a": "zee", + "b": "pan", + "i": 6, + "x": 0.5271261600918548, + "y": 0.49322128674835697 + } +} +{ + "v": { + "a": "zee", + "b": "wye", + "i": 8, + "x": 0.5985540091064224, + "y": 0.976181385699006 + } +} + +mlr put -q @v=$*; dump > "./output-regtest/dump1/out.".$a ./reg_test/input/abixy + +cat ./output-regtest/dump1/out.eks +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +{ + "v": { + "a": "eks", + "b": "wye", + "i": 4, + "x": 0.38139939387114097, + "y": 0.13418874328430463 + } +} +{ + "v": { + "a": "eks", + "b": "zee", + "i": 7, + "x": 0.6117840605678454, + "y": 0.1878849191181694 + } +} + +cat ./output-regtest/dump1/out.hat +{ + "v": { + "a": "hat", + "b": "wye", + "i": 9, + "x": 0.03144187646093577, + "y": 0.7495507603507059 + } +} + +cat ./output-regtest/dump1/out.pan +{ + "v": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } +} +{ + "v": { + "a": "pan", + "b": "wye", + "i": 10, + "x": 0.5026260055412137, + "y": 0.9526183602969864 + } +} + +cat ./output-regtest/dump1/out.wye +{ + "v": { + "a": "wye", + "b": "wye", + "i": 3, + "x": 0.20460330576630303, + "y": 0.33831852551664776 + } +} +{ + "v": { + "a": "wye", + "b": "pan", + "i": 5, + "x": 0.5732889198020006, + "y": 0.8636244699032729 + } +} + +cat ./output-regtest/dump1/out.zee +{ + "v": { + "a": "zee", + "b": "pan", + "i": 6, + "x": 0.5271261600918548, + "y": 0.49322128674835697 + } +} +{ + "v": { + "a": "zee", + "b": "wye", + "i": 8, + "x": 0.5985540091064224, + "y": 0.976181385699006 + } +} + +mlr put -q @v=$*; dump >> "./output-regtest/dump1/out.".$a ./reg_test/input/abixy + +cat ./output-regtest/dump1/out.eks +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +{ + "v": { + "a": "eks", + "b": "wye", + "i": 4, + "x": 0.38139939387114097, + "y": 0.13418874328430463 + } +} +{ + "v": { + "a": "eks", + "b": "zee", + "i": 7, + "x": 0.6117840605678454, + "y": 0.1878849191181694 + } +} +{ + "v": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } +} +{ + "v": { + "a": "eks", + "b": "wye", + "i": 4, + "x": 0.38139939387114097, + "y": 0.13418874328430463 + } +} +{ + "v": { + "a": "eks", + "b": "zee", + "i": 7, + "x": 0.6117840605678454, + "y": 0.1878849191181694 + } +} + +cat ./output-regtest/dump1/out.hat +{ + "v": { + "a": "hat", + "b": "wye", + "i": 9, + "x": 0.03144187646093577, + "y": 0.7495507603507059 + } +} +{ + "v": { + "a": "hat", + "b": "wye", + "i": 9, + "x": 0.03144187646093577, + "y": 0.7495507603507059 + } +} + +cat ./output-regtest/dump1/out.pan +{ + "v": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } +} +{ + "v": { + "a": "pan", + "b": "wye", + "i": 10, + "x": 0.5026260055412137, + "y": 0.9526183602969864 + } +} +{ + "v": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + } +} +{ + "v": { + "a": "pan", + "b": "wye", + "i": 10, + "x": 0.5026260055412137, + "y": 0.9526183602969864 + } +} + +cat ./output-regtest/dump1/out.wye +{ + "v": { + "a": "wye", + "b": "wye", + "i": 3, + "x": 0.20460330576630303, + "y": 0.33831852551664776 + } +} +{ + "v": { + "a": "wye", + "b": "pan", + "i": 5, + "x": 0.5732889198020006, + "y": 0.8636244699032729 + } +} +{ + "v": { + "a": "wye", + "b": "wye", + "i": 3, + "x": 0.20460330576630303, + "y": 0.33831852551664776 + } +} +{ + "v": { + "a": "wye", + "b": "pan", + "i": 5, + "x": 0.5732889198020006, + "y": 0.8636244699032729 + } +} + +cat ./output-regtest/dump1/out.zee +{ + "v": { + "a": "zee", + "b": "pan", + "i": 6, + "x": 0.5271261600918548, + "y": 0.49322128674835697 + } +} +{ + "v": { + "a": "zee", + "b": "wye", + "i": 8, + "x": 0.5985540091064224, + "y": 0.976181385699006 + } +} +{ + "v": { + "a": "zee", + "b": "pan", + "i": 6, + "x": 0.5271261600918548, + "y": 0.49322128674835697 + } +} +{ + "v": { + "a": "zee", + "b": "wye", + "i": 8, + "x": 0.5985540091064224, + "y": 0.976181385699006 + } +} + +mlr put -q @v=$*; dump | "tr \[a-z\] \[A-Z\]" ./reg_test/input/abixy +{ + "V": { + "A": "PAN", + "B": "PAN", + "I": 1, + "X": 0.3467901443380824, + "Y": 0.7268028627434533 + } +} +{ + "V": { + "A": "EKS", + "B": "PAN", + "I": 2, + "X": 0.7586799647899636, + "Y": 0.5221511083334797 + } +} +{ + "V": { + "A": "WYE", + "B": "WYE", + "I": 3, + "X": 0.20460330576630303, + "Y": 0.33831852551664776 + } +} +{ + "V": { + "A": "EKS", + "B": "WYE", + "I": 4, + "X": 0.38139939387114097, + "Y": 0.13418874328430463 + } +} +{ + "V": { + "A": "WYE", + "B": "PAN", + "I": 5, + "X": 0.5732889198020006, + "Y": 0.8636244699032729 + } +} +{ + "V": { + "A": "ZEE", + "B": "PAN", + "I": 6, + "X": 0.5271261600918548, + "Y": 0.49322128674835697 + } +} +{ + "V": { + "A": "EKS", + "B": "ZEE", + "I": 7, + "X": 0.6117840605678454, + "Y": 0.1878849191181694 + } +} +{ + "V": { + "A": "ZEE", + "B": "WYE", + "I": 8, + "X": 0.5985540091064224, + "Y": 0.976181385699006 + } +} +{ + "V": { + "A": "HAT", + "B": "WYE", + "I": 9, + "X": 0.03144187646093577, + "Y": 0.7495507603507059 + } +} +{ + "V": { + "A": "PAN", + "B": "WYE", + "I": 10, + "X": 0.5026260055412137, + "Y": 0.9526183602969864 + } +} + +mlr put -q @v[NR] = $*; NR == 2 { dump > stdout } ./reg_test/input/abixy +{ + "v": { + "1": { + "a": "pan", + "b": "pan", + "i": 1, + "x": 0.3467901443380824, + "y": 0.7268028627434533 + }, + "2": { + "a": "eks", + "b": "pan", + "i": 2, + "x": 0.7586799647899636, + "y": 0.5221511083334797 + } + } +} + +cat ./output-regtest/dump1/err1 + +mlr put -q @v[NR] = $*; NR == 2 { dump > stderr } ./reg_test/input/abixy + +cat ./output-regtest/dump1/err2 + + +================================================================ +DSL EMITF REDIRECTS + +mlr put -q @a=$a; @b=$b; emitf > "./output-regtest/emitf1/out.".$a.$b, @a, @b ./reg_test/input/abixy + +cat ./output-regtest/emitf1/out.ekspan +a=eks,b=pan + +cat ./output-regtest/emitf1/out.ekswye +a=eks,b=wye + +cat ./output-regtest/emitf1/out.ekszee +a=eks,b=zee + +cat ./output-regtest/emitf1/out.hatwye +a=hat,b=wye + +cat ./output-regtest/emitf1/out.panpan +a=pan,b=pan + +cat ./output-regtest/emitf1/out.panwye +a=pan,b=wye + +cat ./output-regtest/emitf1/out.wyepan +a=wye,b=pan + +cat ./output-regtest/emitf1/out.wyewye +a=wye,b=wye + +cat ./output-regtest/emitf1/out.zeepan +a=zee,b=pan + +cat ./output-regtest/emitf1/out.zeewye +a=zee,b=wye + +mlr put -q @a=$a; @b=$b; emitf > "./output-regtest/emitf1/out.".$a.$b, @a, @b ./reg_test/input/abixy + +cat ./output-regtest/emitf1/out.ekspan +a=eks,b=pan + +cat ./output-regtest/emitf1/out.ekswye +a=eks,b=wye + +cat ./output-regtest/emitf1/out.ekszee +a=eks,b=zee + +cat ./output-regtest/emitf1/out.hatwye +a=hat,b=wye + +cat ./output-regtest/emitf1/out.panpan +a=pan,b=pan + +cat ./output-regtest/emitf1/out.panwye +a=pan,b=wye + +cat ./output-regtest/emitf1/out.wyepan +a=wye,b=pan + +cat ./output-regtest/emitf1/out.wyewye +a=wye,b=wye + +cat ./output-regtest/emitf1/out.zeepan +a=zee,b=pan + +cat ./output-regtest/emitf1/out.zeewye +a=zee,b=wye + +mlr put -q @a=$a; @b=$b; emitf >> "./output-regtest/emitf1/out.".$a.$b, @a, @b ./reg_test/input/abixy + +cat ./output-regtest/emitf1/out.ekspan +a=eks,b=pan +a=eks,b=pan + +cat ./output-regtest/emitf1/out.ekswye +a=eks,b=wye +a=eks,b=wye + +cat ./output-regtest/emitf1/out.ekszee +a=eks,b=zee +a=eks,b=zee + +cat ./output-regtest/emitf1/out.hatwye +a=hat,b=wye +a=hat,b=wye + +cat ./output-regtest/emitf1/out.panpan +a=pan,b=pan +a=pan,b=pan + +cat ./output-regtest/emitf1/out.panwye +a=pan,b=wye +a=pan,b=wye + +cat ./output-regtest/emitf1/out.wyepan +a=wye,b=pan +a=wye,b=pan + +cat ./output-regtest/emitf1/out.wyewye +a=wye,b=wye +a=wye,b=wye + +cat ./output-regtest/emitf1/out.zeepan +a=zee,b=pan +a=zee,b=pan + +cat ./output-regtest/emitf1/out.zeewye +a=zee,b=wye +a=zee,b=wye + +mlr put -q -o json @a=$a; @b=$b; emitf > "./output-regtest/emitf1/out.".$a.$b, @a, @b ./reg_test/input/abixy + +cat ./output-regtest/emitf1/out.ekspan +{ "a": "eks", "b": "pan" } + +cat ./output-regtest/emitf1/out.ekswye +{ "a": "eks", "b": "wye" } + +cat ./output-regtest/emitf1/out.ekszee +{ "a": "eks", "b": "zee" } + +cat ./output-regtest/emitf1/out.hatwye +{ "a": "hat", "b": "wye" } + +cat ./output-regtest/emitf1/out.panpan +{ "a": "pan", "b": "pan" } + +cat ./output-regtest/emitf1/out.panwye +{ "a": "pan", "b": "wye" } + +cat ./output-regtest/emitf1/out.wyepan +{ "a": "wye", "b": "pan" } + +cat ./output-regtest/emitf1/out.wyewye +{ "a": "wye", "b": "wye" } + +cat ./output-regtest/emitf1/out.zeepan +{ "a": "zee", "b": "pan" } + +cat ./output-regtest/emitf1/out.zeewye +{ "a": "zee", "b": "wye" } + +mlr put -q @a=$a; @b=$b; emitf | "tr \[a-z\] \[A-Z\]", @a, @b ./reg_test/input/abixy +A=PAN,B=PAN +A=EKS,B=PAN +A=WYE,B=WYE +A=EKS,B=WYE +A=WYE,B=PAN +A=ZEE,B=PAN +A=EKS,B=ZEE +A=ZEE,B=WYE +A=HAT,B=WYE +A=PAN,B=WYE + +mlr put -q @a=$a; @b=$b; emitf > stdout, @a, @b ./reg_test/input/abixy +a=pan,b=pan +a=eks,b=pan +a=wye,b=wye +a=eks,b=wye +a=wye,b=pan +a=zee,b=pan +a=eks,b=zee +a=zee,b=wye +a=hat,b=wye +a=pan,b=wye + +cat ./output-regtest/emitf1/err1 + +mlr put -q @a=$a; @b=$b; emitf > stderr, @a, @b ./reg_test/input/abixy + +cat ./output-regtest/emitf1/err2 + + +================================================================ +DSL EMITP REDIRECTS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emitp1/out.ekspan +a:1=pan,a:2=eks + +cat ./output-regtest/emitp1/out.ekswye +a:1=pan,a:2=eks,a:3=wye,a:4=eks + +cat ./output-regtest/emitp1/out.panpan +a:1=pan + +cat ./output-regtest/emitp1/out.wyewye +a:1=pan,a:2=eks,a:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emitp1/out.ekspan +a:1=pan,a:2=eks + +cat ./output-regtest/emitp1/out.ekswye +a:1=pan,a:2=eks,a:3=wye,a:4=eks + +cat ./output-regtest/emitp1/out.panpan +a:1=pan + +cat ./output-regtest/emitp1/out.wyewye +a:1=pan,a:2=eks,a:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp >> "./output-regtest/emitp1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emitp1/out.ekspan +a:1=pan,a:2=eks +a:1=pan,a:2=eks + +cat ./output-regtest/emitp1/out.ekswye +a:1=pan,a:2=eks,a:3=wye,a:4=eks +a:1=pan,a:2=eks,a:3=wye,a:4=eks + +cat ./output-regtest/emitp1/out.panpan +a:1=pan +a:1=pan + +cat ./output-regtest/emitp1/out.wyewye +a:1=pan,a:2=eks,a:3=wye +a:1=pan,a:2=eks,a:3=wye + +mlr head -n 4 then put -q -o json @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emitp1/out.ekspan +{ "a": {"1": "pan", "2": "eks" } } + +cat ./output-regtest/emitp1/out.ekswye +{ "a": {"1": "pan", "2": "eks", "3": "wye", "4": "eks" } } + +cat ./output-regtest/emitp1/out.panpan +{ "a": {"1": "pan" } } + +cat ./output-regtest/emitp1/out.wyewye +{ "a": {"1": "pan", "2": "eks", "3": "wye" } } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a ./reg_test/input/abixy +A:1=PAN +A:1=PAN,A:2=EKS +A:1=PAN,A:2=EKS,A:3=WYE +A:1=PAN,A:2=EKS,A:3=WYE,A:4=EKS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, @a ./reg_test/input/abixy +a:1=pan +a:1=pan,a:2=eks +a:1=pan,a:2=eks,a:3=wye +a:1=pan,a:2=eks,a:3=wye,a:4=eks + +cat ./output-regtest/emitp1/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, @a ./reg_test/input/abixy + +cat ./output-regtest/emitp1/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp2/out.ekspan +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emitp2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emitp2/out.panpan +NR=1,a=pan + +cat ./output-regtest/emitp2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp2/out.ekspan +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emitp2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emitp2/out.panpan +NR=1,a=pan + +cat ./output-regtest/emitp2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp >> "./output-regtest/emitp2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp2/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emitp2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emitp2/out.panpan +NR=1,a=pan +NR=1,a=pan + +cat ./output-regtest/emitp2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q -o json @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp2/out.ekspan +{ "NR": 1, "a": "pan" } +{ "NR": 2, "a": "eks" } + +cat ./output-regtest/emitp2/out.ekswye +{ "NR": 1, "a": "pan" } +{ "NR": 2, "a": "eks" } +{ "NR": 3, "a": "wye" } +{ "NR": 4, "a": "eks" } + +cat ./output-regtest/emitp2/out.panpan +{ "NR": 1, "a": "pan" } + +cat ./output-regtest/emitp2/out.wyewye +{ "NR": 1, "a": "pan" } +{ "NR": 2, "a": "eks" } +{ "NR": 3, "a": "wye" } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @a, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, @a, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,a=pan +NR=2,a=eks +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emitp2/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp2/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emitp3/out.ekspan +a:1=pan,b:1=pan,a:2=eks,b:2=pan + +cat ./output-regtest/emitp3/out.ekswye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye,a:4=eks,b:4=wye + +cat ./output-regtest/emitp3/out.panpan +a:1=pan,b:1=pan + +cat ./output-regtest/emitp3/out.wyewye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emitp3/out.ekspan +a:1=pan,b:1=pan,a:2=eks,b:2=pan + +cat ./output-regtest/emitp3/out.ekswye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye,a:4=eks,b:4=wye + +cat ./output-regtest/emitp3/out.panpan +a:1=pan,b:1=pan + +cat ./output-regtest/emitp3/out.wyewye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp >> "./output-regtest/emitp3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emitp3/out.ekspan +a:1=pan,b:1=pan,a:2=eks,b:2=pan +a:1=pan,b:1=pan,a:2=eks,b:2=pan + +cat ./output-regtest/emitp3/out.ekswye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye,a:4=eks,b:4=wye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye,a:4=eks,b:4=wye + +cat ./output-regtest/emitp3/out.panpan +a:1=pan,b:1=pan +a:1=pan,b:1=pan + +cat ./output-regtest/emitp3/out.wyewye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye + +mlr head -n 4 then put -q -o json @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emitp3/out.ekspan +{ "a": {"1": "pan", "2": "eks" },"b": {"1": "pan", "2": "pan" } } + +cat ./output-regtest/emitp3/out.ekswye +{ "a": {"1": "pan", "2": "eks", "3": "wye", "4": "eks" },"b": {"1": "pan", "2": "pan", "3": "wye", "4": "wye" } } + +cat ./output-regtest/emitp3/out.panpan +{ "a": {"1": "pan" },"b": {"1": "pan" } } + +cat ./output-regtest/emitp3/out.wyewye +{ "a": {"1": "pan", "2": "eks", "3": "wye" },"b": {"1": "pan", "2": "pan", "3": "wye" } } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b) ./reg_test/input/abixy +A:1=PAN,B:1=PAN +A:1=PAN,B:1=PAN,A:2=EKS,B:2=PAN +A:1=PAN,B:1=PAN,A:2=EKS,B:2=PAN,A:3=WYE,B:3=WYE +A:1=PAN,B:1=PAN,A:2=EKS,B:2=PAN,A:3=WYE,B:3=WYE,A:4=EKS,B:4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b) ./reg_test/input/abixy +a:1=pan,b:1=pan +a:1=pan,b:1=pan,a:2=eks,b:2=pan +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye +a:1=pan,b:1=pan,a:2=eks,b:2=pan,a:3=wye,b:3=wye,a:4=eks,b:4=wye + +cat ./output-regtest/emitp3/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emitp3/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emitp4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emitp4/out.panpan +NR=1,a=pan,b=pan + +cat ./output-regtest/emitp4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emitp4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emitp4/out.panpan +NR=1,a=pan,b=pan + +cat ./output-regtest/emitp4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp >> "./output-regtest/emitp4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emitp4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emitp4/out.panpan +NR=1,a=pan,b=pan +NR=1,a=pan,b=pan + +cat ./output-regtest/emitp4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q -o json @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp4/out.ekspan +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } + +cat ./output-regtest/emitp4/out.ekswye +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } +{ "NR": 3, "a": "wye", "b": "wye" } +{ "NR": 4, "a": "eks", "b": "wye" } + +cat ./output-regtest/emitp4/out.panpan +{ "NR": 1, "a": "pan", "b": "pan" } + +cat ./output-regtest/emitp4/out.wyewye +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } +{ "NR": 3, "a": "wye", "b": "wye" } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR" ./reg_test/input/abixy +NR=1,A=PAN,B=PAN +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=3,A=WYE,B=WYE +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=3,A=WYE,B=WYE +NR=4,A=EKS,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, (@a, @b), "NR" ./reg_test/input/abixy +NR=1,a=pan,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emitp4/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp4/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp5/out.".$a.$b, @* ./reg_test/input/abixy + +cat ./output-regtest/emitp5/out.ekspan +a:1=pan,a:2=eks +b:1=pan,b:2=pan + +cat ./output-regtest/emitp5/out.ekswye +a:1=pan,a:2=eks,a:3=wye,a:4=eks +b:1=pan,b:2=pan,b:3=wye,b:4=wye + +cat ./output-regtest/emitp5/out.panpan +a:1=pan +b:1=pan + +cat ./output-regtest/emitp5/out.wyewye +a:1=pan,a:2=eks,a:3=wye +b:1=pan,b:2=pan,b:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @* ./reg_test/input/abixy +A:1=PAN +B:1=PAN +A:1=PAN,A:2=EKS +B:1=PAN,B:2=PAN +A:1=PAN,A:2=EKS,A:3=WYE +B:1=PAN,B:2=PAN,B:3=WYE +A:1=PAN,A:2=EKS,A:3=WYE,A:4=EKS +B:1=PAN,B:2=PAN,B:3=WYE,B:4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, @* ./reg_test/input/abixy +a:1=pan +b:1=pan +a:1=pan,a:2=eks +b:1=pan,b:2=pan +a:1=pan,a:2=eks,a:3=wye +b:1=pan,b:2=pan,b:3=wye +a:1=pan,a:2=eks,a:3=wye,a:4=eks +b:1=pan,b:2=pan,b:3=wye,b:4=wye + +cat ./output-regtest/emitp5/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, @* ./reg_test/input/abixy + +cat ./output-regtest/emitp5/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp6/out.".$a.$b, all ./reg_test/input/abixy + +cat ./output-regtest/emitp6/out.ekspan +a:1=pan,a:2=eks +b:1=pan,b:2=pan + +cat ./output-regtest/emitp6/out.ekswye +a:1=pan,a:2=eks,a:3=wye,a:4=eks +b:1=pan,b:2=pan,b:3=wye,b:4=wye + +cat ./output-regtest/emitp6/out.panpan +a:1=pan +b:1=pan + +cat ./output-regtest/emitp6/out.wyewye +a:1=pan,a:2=eks,a:3=wye +b:1=pan,b:2=pan,b:3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all ./reg_test/input/abixy +A:1=PAN +B:1=PAN +A:1=PAN,A:2=EKS +B:1=PAN,B:2=PAN +A:1=PAN,A:2=EKS,A:3=WYE +B:1=PAN,B:2=PAN,B:3=WYE +A:1=PAN,A:2=EKS,A:3=WYE,A:4=EKS +B:1=PAN,B:2=PAN,B:3=WYE,B:4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, all ./reg_test/input/abixy +a:1=pan +b:1=pan +a:1=pan,a:2=eks +b:1=pan,b:2=pan +a:1=pan,a:2=eks,a:3=wye +b:1=pan,b:2=pan,b:3=wye +a:1=pan,a:2=eks,a:3=wye,a:4=eks +b:1=pan,b:2=pan,b:3=wye,b:4=wye + +cat ./output-regtest/emitp6/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, all ./reg_test/input/abixy + +cat ./output-regtest/emitp6/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp7/out.".$a.$b, @*, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp7/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan + +cat ./output-regtest/emitp7/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emitp7/out.panpan +NR=1,a=pan +NR=1,b=pan + +cat ./output-regtest/emitp7/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", @*, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=4,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, @*, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,b=pan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emitp7/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, @*, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp7/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > "./output-regtest/emitp8/out.".$a.$b, all, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp8/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan + +cat ./output-regtest/emitp8/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emitp8/out.panpan +NR=1,a=pan +NR=1,b=pan + +cat ./output-regtest/emitp8/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp | "tr \[a-z\] \[A-Z\]", all, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=4,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stdout, all, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,b=pan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emitp8/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emitp > stderr, all, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emitp8/err2 + + +================================================================ +DSL EMIT REDIRECTS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emit1/out.ekspan +1=pan,2=eks + +cat ./output-regtest/emit1/out.ekswye +1=pan,2=eks,3=wye,4=eks + +cat ./output-regtest/emit1/out.panpan +1=pan + +cat ./output-regtest/emit1/out.wyewye +1=pan,2=eks,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emit1/out.ekspan +1=pan,2=eks + +cat ./output-regtest/emit1/out.ekswye +1=pan,2=eks,3=wye,4=eks + +cat ./output-regtest/emit1/out.panpan +1=pan + +cat ./output-regtest/emit1/out.wyewye +1=pan,2=eks,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit >> "./output-regtest/emit1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emit1/out.ekspan +1=pan,2=eks +1=pan,2=eks + +cat ./output-regtest/emit1/out.ekswye +1=pan,2=eks,3=wye,4=eks +1=pan,2=eks,3=wye,4=eks + +cat ./output-regtest/emit1/out.panpan +1=pan +1=pan + +cat ./output-regtest/emit1/out.wyewye +1=pan,2=eks,3=wye +1=pan,2=eks,3=wye + +mlr head -n 4 then put -q -o json @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit1/out.".$a.$b, @a ./reg_test/input/abixy + +cat ./output-regtest/emit1/out.ekspan +{ "1": "pan", "2": "eks" } + +cat ./output-regtest/emit1/out.ekswye +{ "1": "pan", "2": "eks", "3": "wye", "4": "eks" } + +cat ./output-regtest/emit1/out.panpan +{ "1": "pan" } + +cat ./output-regtest/emit1/out.wyewye +{ "1": "pan", "2": "eks", "3": "wye" } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a ./reg_test/input/abixy +1=PAN +1=PAN,2=EKS +1=PAN,2=EKS,3=WYE +1=PAN,2=EKS,3=WYE,4=EKS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, @a ./reg_test/input/abixy +1=pan +1=pan,2=eks +1=pan,2=eks,3=wye +1=pan,2=eks,3=wye,4=eks + +cat ./output-regtest/emit1/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, @a ./reg_test/input/abixy + +cat ./output-regtest/emit1/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit2/out.ekspan +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emit2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emit2/out.panpan +NR=1,a=pan + +cat ./output-regtest/emit2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit2/out.ekspan +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emit2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emit2/out.panpan +NR=1,a=pan + +cat ./output-regtest/emit2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit >> "./output-regtest/emit2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit2/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,a=pan +NR=2,a=eks + +cat ./output-regtest/emit2/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emit2/out.panpan +NR=1,a=pan +NR=1,a=pan + +cat ./output-regtest/emit2/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye + +mlr head -n 4 then put -q -o pprint @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit2/out.".$a.$b, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit2/out.ekspan +NR a +1 pan +2 eks + +cat ./output-regtest/emit2/out.ekswye +NR a +1 pan +2 eks +3 wye +4 eks + +cat ./output-regtest/emit2/out.panpan +NR a +1 pan + +cat ./output-regtest/emit2/out.wyewye +NR a +1 pan +2 eks +3 wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @a, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, @a, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,a=pan +NR=2,a=eks +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks + +cat ./output-regtest/emit2/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, @a, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit2/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emit3/out.ekspan +1=pan,2=pan + +cat ./output-regtest/emit3/out.ekswye +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit3/out.panpan +1=pan + +cat ./output-regtest/emit3/out.wyewye +1=pan,2=pan,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emit3/out.ekspan +1=pan,2=pan + +cat ./output-regtest/emit3/out.ekswye +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit3/out.panpan +1=pan + +cat ./output-regtest/emit3/out.wyewye +1=pan,2=pan,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit >> "./output-regtest/emit3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emit3/out.ekspan +1=pan,2=pan +1=pan,2=pan + +cat ./output-regtest/emit3/out.ekswye +1=pan,2=pan,3=wye,4=wye +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit3/out.panpan +1=pan +1=pan + +cat ./output-regtest/emit3/out.wyewye +1=pan,2=pan,3=wye +1=pan,2=pan,3=wye + +mlr head -n 4 then put -q --oxtab @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit3/out.".$a.$b, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emit3/out.ekspan +1 pan +2 pan + +cat ./output-regtest/emit3/out.ekswye +1 pan +2 pan +3 wye +4 wye + +cat ./output-regtest/emit3/out.panpan +1 pan + +cat ./output-regtest/emit3/out.wyewye +1 pan +2 pan +3 wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b) ./reg_test/input/abixy +1=PAN +1=PAN,2=PAN +1=PAN,2=PAN,3=WYE +1=PAN,2=PAN,3=WYE,4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b) ./reg_test/input/abixy +1=pan +1=pan,2=pan +1=pan,2=pan,3=wye +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit3/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b) ./reg_test/input/abixy + +cat ./output-regtest/emit3/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emit4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emit4/out.panpan +NR=1,a=pan,b=pan + +cat ./output-regtest/emit4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emit4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emit4/out.panpan +NR=1,a=pan,b=pan + +cat ./output-regtest/emit4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit >> "./output-regtest/emit4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit4/out.ekspan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan + +cat ./output-regtest/emit4/out.ekswye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emit4/out.panpan +NR=1,a=pan,b=pan +NR=1,a=pan,b=pan + +cat ./output-regtest/emit4/out.wyewye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye + +mlr head -n 4 then put -q --ojson @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit4/out.".$a.$b, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit4/out.ekspan +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } + +cat ./output-regtest/emit4/out.ekswye +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } +{ "NR": 3, "a": "wye", "b": "wye" } +{ "NR": 4, "a": "eks", "b": "wye" } + +cat ./output-regtest/emit4/out.panpan +{ "NR": 1, "a": "pan", "b": "pan" } + +cat ./output-regtest/emit4/out.wyewye +{ "NR": 1, "a": "pan", "b": "pan" } +{ "NR": 2, "a": "eks", "b": "pan" } +{ "NR": 3, "a": "wye", "b": "wye" } + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", (@a, @b), "NR" ./reg_test/input/abixy +NR=1,A=PAN,B=PAN +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=3,A=WYE,B=WYE +NR=1,A=PAN,B=PAN +NR=2,A=EKS,B=PAN +NR=3,A=WYE,B=WYE +NR=4,A=EKS,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, (@a, @b), "NR" ./reg_test/input/abixy +NR=1,a=pan,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=1,a=pan,b=pan +NR=2,a=eks,b=pan +NR=3,a=wye,b=wye +NR=4,a=eks,b=wye + +cat ./output-regtest/emit4/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, (@a, @b), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit4/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit5/out.".$a.$b, @* ./reg_test/input/abixy + +cat ./output-regtest/emit5/out.ekspan +1=pan,2=eks +1=pan,2=pan + +cat ./output-regtest/emit5/out.ekswye +1=pan,2=eks,3=wye,4=eks +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit5/out.panpan +1=pan +1=pan + +cat ./output-regtest/emit5/out.wyewye +1=pan,2=eks,3=wye +1=pan,2=pan,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @* ./reg_test/input/abixy +1=PAN +1=PAN +1=PAN,2=EKS +1=PAN,2=PAN +1=PAN,2=EKS,3=WYE +1=PAN,2=PAN,3=WYE +1=PAN,2=EKS,3=WYE,4=EKS +1=PAN,2=PAN,3=WYE,4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, @* ./reg_test/input/abixy +1=pan +1=pan +1=pan,2=eks +1=pan,2=pan +1=pan,2=eks,3=wye +1=pan,2=pan,3=wye +1=pan,2=eks,3=wye,4=eks +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit5/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, @* ./reg_test/input/abixy + +cat ./output-regtest/emit5/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit6/out.".$a.$b, all ./reg_test/input/abixy + +cat ./output-regtest/emit6/out.ekspan +1=pan,2=eks +1=pan,2=pan + +cat ./output-regtest/emit6/out.ekswye +1=pan,2=eks,3=wye,4=eks +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit6/out.panpan +1=pan +1=pan + +cat ./output-regtest/emit6/out.wyewye +1=pan,2=eks,3=wye +1=pan,2=pan,3=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all ./reg_test/input/abixy +1=PAN +1=PAN +1=PAN,2=EKS +1=PAN,2=PAN +1=PAN,2=EKS,3=WYE +1=PAN,2=PAN,3=WYE +1=PAN,2=EKS,3=WYE,4=EKS +1=PAN,2=PAN,3=WYE,4=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, all ./reg_test/input/abixy +1=pan +1=pan +1=pan,2=eks +1=pan,2=pan +1=pan,2=eks,3=wye +1=pan,2=pan,3=wye +1=pan,2=eks,3=wye,4=eks +1=pan,2=pan,3=wye,4=wye + +cat ./output-regtest/emit6/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, all ./reg_test/input/abixy + +cat ./output-regtest/emit6/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit7/out.".$a.$b, @*, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit7/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan + +cat ./output-regtest/emit7/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emit7/out.panpan +NR=1,a=pan +NR=1,b=pan + +cat ./output-regtest/emit7/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", @*, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=4,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, @*, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,b=pan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emit7/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, @*, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit7/err2 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > "./output-regtest/emit8/out.".$a.$b, all, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit8/out.ekspan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan + +cat ./output-regtest/emit8/out.ekswye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emit8/out.panpan +NR=1,a=pan +NR=1,b=pan + +cat ./output-regtest/emit8/out.wyewye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", all, "NR" ./reg_test/input/abixy +NR=1,A=PAN +NR=1,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=1,A=PAN +NR=2,A=EKS +NR=3,A=WYE +NR=4,A=EKS +NR=1,B=PAN +NR=2,B=PAN +NR=3,B=WYE +NR=4,B=WYE + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, all, "NR" ./reg_test/input/abixy +NR=1,a=pan +NR=1,b=pan +NR=1,a=pan +NR=2,a=eks +NR=1,b=pan +NR=2,b=pan +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=1,a=pan +NR=2,a=eks +NR=3,a=wye +NR=4,a=eks +NR=1,b=pan +NR=2,b=pan +NR=3,b=wye +NR=4,b=wye + +cat ./output-regtest/emit8/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, all, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit8/err2 + +mlr head -n 4 then put -q emit > "./output-regtest/emit9/out.".$a.$b, $* ./reg_test/input/abixy + +cat ./output-regtest/emit9/out.ekspan +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 + +cat ./output-regtest/emit9/out.ekswye +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 + +cat ./output-regtest/emit9/out.panpan +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 + +cat ./output-regtest/emit9/out.wyewye +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", $*, "NR" ./reg_test/input/abixy +A=PAN,B=PAN,I=1,X=0.3467901443380824,Y=0.7268028627434533 +A=EKS,B=PAN,I=2,X=0.7586799647899636,Y=0.5221511083334797 +A=WYE,B=WYE,I=3,X=0.20460330576630303,Y=0.33831852551664776 +A=EKS,B=WYE,I=4,X=0.38139939387114097,Y=0.13418874328430463 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, $*, "NR" ./reg_test/input/abixy +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 + +cat ./output-regtest/emit9/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, $*, "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit9/err2 + +mlr head -n 4 then put -q emit > "./output-regtest/emit10/out.".$a.$b, mapexcept($*, "a", "b") ./reg_test/input/abixy + +cat ./output-regtest/emit10/out.ekspan +i=2,x=0.7586799647899636,y=0.5221511083334797 + +cat ./output-regtest/emit10/out.ekswye +i=4,x=0.38139939387114097,y=0.13418874328430463 + +cat ./output-regtest/emit10/out.panpan +i=1,x=0.3467901443380824,y=0.7268028627434533 + +cat ./output-regtest/emit10/out.wyewye +i=3,x=0.20460330576630303,y=0.33831852551664776 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit | "tr \[a-z\] \[A-Z\]", mapexcept($*, "a", "b"), "NR" ./reg_test/input/abixy +NR=I,_=1 +NR=X,_=0.3467901443380824 +NR=Y,_=0.7268028627434533 +NR=I,_=2 +NR=X,_=0.7586799647899636 +NR=Y,_=0.5221511083334797 +NR=I,_=3 +NR=X,_=0.20460330576630303 +NR=Y,_=0.33831852551664776 +NR=I,_=4 +NR=X,_=0.38139939387114097 +NR=Y,_=0.13418874328430463 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stdout, mapexcept($*, "a", "b"), "NR" ./reg_test/input/abixy +NR=i,_=1 +NR=x,_=0.3467901443380824 +NR=y,_=0.7268028627434533 +NR=i,_=2 +NR=x,_=0.7586799647899636 +NR=y,_=0.5221511083334797 +NR=i,_=3 +NR=x,_=0.20460330576630303 +NR=y,_=0.33831852551664776 +NR=i,_=4 +NR=x,_=0.38139939387114097 +NR=y,_=0.13418874328430463 + +cat ./output-regtest/emit10/err1 + +mlr head -n 4 then put -q @a[NR]=$a; @b[NR]=$b; emit > stderr, mapexcept($*, "a", "b"), "NR" ./reg_test/input/abixy + +cat ./output-regtest/emit10/err2 + diff --git a/c/reg_test/expected/case-dsl-scientific-notation.sh.out b/c/reg_test/expected/case-dsl-scientific-notation.sh.out new file mode 100644 index 000000000..d28112ad0 --- /dev/null +++ b/c/reg_test/expected/case-dsl-scientific-notation.sh.out @@ -0,0 +1,142 @@ + + +================================================================ +DSL SCIENTIFIC NOTATION IN FIELD VALUES + +mlr --opprint put $y=$x+1 ./reg_test/input/scinot.dkvp +x y +123 124 +123. 124.000000 +123.4 124.400000 +.234 1.234000 +1e2 101.000000 +1e-2 1.010000 +1.2e3 1201.000000 +1.e3 1001.000000 +1.2e-3 1.001200 +1.e-3 1.001000 +.2e3 201.000000 +.2e-3 1.000200 +1.e-3 1.001000 +-123 -122 +-123. -122.000000 +-123.4 -122.400000 +-.234 0.766000 +-1e2 -99.000000 +-1e-2 0.990000 +-1.2e3 -1199.000000 +-1.e3 -999.000000 +-1.2e-3 0.998800 +-1.e-3 0.999000 +-.2e3 -199.000000 +-.2e-3 0.999800 +-1.e-3 0.999000 + + +================================================================ +DSL SCIENTIFIC NOTATION IN EXPRESSION LITERALS + +mlr --opprint put $y = 123 + $i ./reg_test/input/scinot1.dkvp +i y +1 124 + +mlr --opprint put $y = 123. + $i ./reg_test/input/scinot1.dkvp +i y +1 124.000000 + +mlr --opprint put $y = 123.4 + $i ./reg_test/input/scinot1.dkvp +i y +1 124.400000 + +mlr --opprint put $y = .234 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.234000 + +mlr --opprint put $y = 1e2 + $i ./reg_test/input/scinot1.dkvp +i y +1 101.000000 + +mlr --opprint put $y = 1e-2 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.010000 + +mlr --opprint put $y = 1.2e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1201.000000 + +mlr --opprint put $y = 1.e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1001.000000 + +mlr --opprint put $y = 1.2e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.001200 + +mlr --opprint put $y = 1.e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.001000 + +mlr --opprint put $y = .2e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 201.000000 + +mlr --opprint put $y = .2e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.000200 + +mlr --opprint put $y = 1.e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 1.001000 + +mlr --opprint put $y = -123 + $i ./reg_test/input/scinot1.dkvp +i y +1 -122 + +mlr --opprint put $y = -123. + $i ./reg_test/input/scinot1.dkvp +i y +1 -122.000000 + +mlr --opprint put $y = -123.4 + $i ./reg_test/input/scinot1.dkvp +i y +1 -122.400000 + +mlr --opprint put $y = -.234 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.766000 + +mlr --opprint put $y = -1e2 + $i ./reg_test/input/scinot1.dkvp +i y +1 -99.000000 + +mlr --opprint put $y = -1e-2 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.990000 + +mlr --opprint put $y = -1.2e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 -1199.000000 + +mlr --opprint put $y = -1.e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 -999.000000 + +mlr --opprint put $y = -1.2e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.998800 + +mlr --opprint put $y = -1.e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.999000 + +mlr --opprint put $y = -.2e3 + $i ./reg_test/input/scinot1.dkvp +i y +1 -199.000000 + +mlr --opprint put $y = -.2e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.999800 + +mlr --opprint put $y = -1.e-3 + $i ./reg_test/input/scinot1.dkvp +i y +1 0.999000 + diff --git a/c/reg_test/expected/case-dsl-substr.sh.out b/c/reg_test/expected/case-dsl-substr.sh.out new file mode 100644 index 000000000..474c05200 --- /dev/null +++ b/c/reg_test/expected/case-dsl-substr.sh.out @@ -0,0 +1,845 @@ + +mlr put -q + int n = strlen($x); + print "input= <<".$x.">>"; + for (i = -n-2; i <= n+2; i += 1) { + for (j = -n-2; j <= n+2; j += 1) { + print "i: ".fmtnum(i,"%3lld") + ." j:".fmtnum(j,"%3lld") + ." substr(".$x.",".fmtnum(i,"%3lld").",".fmtnum(j,"%3lld")."): <<" + .substr($x, i, j) .">>"; + } + print; +} + +input= <<>> +i: -2 j: -2 substr(, -2, -2): <<>> +i: -2 j: -1 substr(, -2, -1): <<>> +i: -2 j: 0 substr(, -2, 0): <<>> +i: -2 j: 1 substr(, -2, 1): <<>> +i: -2 j: 2 substr(, -2, 2): <<>> + +i: -1 j: -2 substr(, -1, -2): <<>> +i: -1 j: -1 substr(, -1, -1): <<>> +i: -1 j: 0 substr(, -1, 0): <<>> +i: -1 j: 1 substr(, -1, 1): <<>> +i: -1 j: 2 substr(, -1, 2): <<>> + +i: 0 j: -2 substr(, 0, -2): <<>> +i: 0 j: -1 substr(, 0, -1): <<>> +i: 0 j: 0 substr(, 0, 0): <<>> +i: 0 j: 1 substr(, 0, 1): <<>> +i: 0 j: 2 substr(, 0, 2): <<>> + +i: 1 j: -2 substr(, 1, -2): <<>> +i: 1 j: -1 substr(, 1, -1): <<>> +i: 1 j: 0 substr(, 1, 0): <<>> +i: 1 j: 1 substr(, 1, 1): <<>> +i: 1 j: 2 substr(, 1, 2): <<>> + +i: 2 j: -2 substr(, 2, -2): <<>> +i: 2 j: -1 substr(, 2, -1): <<>> +i: 2 j: 0 substr(, 2, 0): <<>> +i: 2 j: 1 substr(, 2, 1): <<>> +i: 2 j: 2 substr(, 2, 2): <<>> + +input= <> +i: -3 j: -3 substr(o, -3, -3): <<>> +i: -3 j: -2 substr(o, -3, -2): <<>> +i: -3 j: -1 substr(o, -3, -1): <<>> +i: -3 j: 0 substr(o, -3, 0): <<>> +i: -3 j: 1 substr(o, -3, 1): <<>> +i: -3 j: 2 substr(o, -3, 2): <<>> +i: -3 j: 3 substr(o, -3, 3): <<>> + +i: -2 j: -3 substr(o, -2, -3): <<>> +i: -2 j: -2 substr(o, -2, -2): <<>> +i: -2 j: -1 substr(o, -2, -1): <<>> +i: -2 j: 0 substr(o, -2, 0): <<>> +i: -2 j: 1 substr(o, -2, 1): <<>> +i: -2 j: 2 substr(o, -2, 2): <<>> +i: -2 j: 3 substr(o, -2, 3): <<>> + +i: -1 j: -3 substr(o, -1, -3): <<>> +i: -1 j: -2 substr(o, -1, -2): <<>> +i: -1 j: -1 substr(o, -1, -1): <> +i: -1 j: 0 substr(o, -1, 0): <> +i: -1 j: 1 substr(o, -1, 1): <<>> +i: -1 j: 2 substr(o, -1, 2): <<>> +i: -1 j: 3 substr(o, -1, 3): <<>> + +i: 0 j: -3 substr(o, 0, -3): <<>> +i: 0 j: -2 substr(o, 0, -2): <<>> +i: 0 j: -1 substr(o, 0, -1): <> +i: 0 j: 0 substr(o, 0, 0): <> +i: 0 j: 1 substr(o, 0, 1): <<>> +i: 0 j: 2 substr(o, 0, 2): <<>> +i: 0 j: 3 substr(o, 0, 3): <<>> + +i: 1 j: -3 substr(o, 1, -3): <<>> +i: 1 j: -2 substr(o, 1, -2): <<>> +i: 1 j: -1 substr(o, 1, -1): <<>> +i: 1 j: 0 substr(o, 1, 0): <<>> +i: 1 j: 1 substr(o, 1, 1): <<>> +i: 1 j: 2 substr(o, 1, 2): <<>> +i: 1 j: 3 substr(o, 1, 3): <<>> + +i: 2 j: -3 substr(o, 2, -3): <<>> +i: 2 j: -2 substr(o, 2, -2): <<>> +i: 2 j: -1 substr(o, 2, -1): <<>> +i: 2 j: 0 substr(o, 2, 0): <<>> +i: 2 j: 1 substr(o, 2, 1): <<>> +i: 2 j: 2 substr(o, 2, 2): <<>> +i: 2 j: 3 substr(o, 2, 3): <<>> + +i: 3 j: -3 substr(o, 3, -3): <<>> +i: 3 j: -2 substr(o, 3, -2): <<>> +i: 3 j: -1 substr(o, 3, -1): <<>> +i: 3 j: 0 substr(o, 3, 0): <<>> +i: 3 j: 1 substr(o, 3, 1): <<>> +i: 3 j: 2 substr(o, 3, 2): <<>> +i: 3 j: 3 substr(o, 3, 3): <<>> + +input= <> +i: -4 j: -4 substr(o1, -4, -4): <<>> +i: -4 j: -3 substr(o1, -4, -3): <<>> +i: -4 j: -2 substr(o1, -4, -2): <<>> +i: -4 j: -1 substr(o1, -4, -1): <<>> +i: -4 j: 0 substr(o1, -4, 0): <<>> +i: -4 j: 1 substr(o1, -4, 1): <<>> +i: -4 j: 2 substr(o1, -4, 2): <<>> +i: -4 j: 3 substr(o1, -4, 3): <<>> +i: -4 j: 4 substr(o1, -4, 4): <<>> + +i: -3 j: -4 substr(o1, -3, -4): <<>> +i: -3 j: -3 substr(o1, -3, -3): <<>> +i: -3 j: -2 substr(o1, -3, -2): <<>> +i: -3 j: -1 substr(o1, -3, -1): <<>> +i: -3 j: 0 substr(o1, -3, 0): <<>> +i: -3 j: 1 substr(o1, -3, 1): <<>> +i: -3 j: 2 substr(o1, -3, 2): <<>> +i: -3 j: 3 substr(o1, -3, 3): <<>> +i: -3 j: 4 substr(o1, -3, 4): <<>> + +i: -2 j: -4 substr(o1, -2, -4): <<>> +i: -2 j: -3 substr(o1, -2, -3): <<>> +i: -2 j: -2 substr(o1, -2, -2): <> +i: -2 j: -1 substr(o1, -2, -1): <> +i: -2 j: 0 substr(o1, -2, 0): <> +i: -2 j: 1 substr(o1, -2, 1): <> +i: -2 j: 2 substr(o1, -2, 2): <<>> +i: -2 j: 3 substr(o1, -2, 3): <<>> +i: -2 j: 4 substr(o1, -2, 4): <<>> + +i: -1 j: -4 substr(o1, -1, -4): <<>> +i: -1 j: -3 substr(o1, -1, -3): <<>> +i: -1 j: -2 substr(o1, -1, -2): <<>> +i: -1 j: -1 substr(o1, -1, -1): <<1>> +i: -1 j: 0 substr(o1, -1, 0): <<>> +i: -1 j: 1 substr(o1, -1, 1): <<1>> +i: -1 j: 2 substr(o1, -1, 2): <<>> +i: -1 j: 3 substr(o1, -1, 3): <<>> +i: -1 j: 4 substr(o1, -1, 4): <<>> + +i: 0 j: -4 substr(o1, 0, -4): <<>> +i: 0 j: -3 substr(o1, 0, -3): <<>> +i: 0 j: -2 substr(o1, 0, -2): <> +i: 0 j: -1 substr(o1, 0, -1): <> +i: 0 j: 0 substr(o1, 0, 0): <> +i: 0 j: 1 substr(o1, 0, 1): <> +i: 0 j: 2 substr(o1, 0, 2): <<>> +i: 0 j: 3 substr(o1, 0, 3): <<>> +i: 0 j: 4 substr(o1, 0, 4): <<>> + +i: 1 j: -4 substr(o1, 1, -4): <<>> +i: 1 j: -3 substr(o1, 1, -3): <<>> +i: 1 j: -2 substr(o1, 1, -2): <<>> +i: 1 j: -1 substr(o1, 1, -1): <<1>> +i: 1 j: 0 substr(o1, 1, 0): <<>> +i: 1 j: 1 substr(o1, 1, 1): <<1>> +i: 1 j: 2 substr(o1, 1, 2): <<>> +i: 1 j: 3 substr(o1, 1, 3): <<>> +i: 1 j: 4 substr(o1, 1, 4): <<>> + +i: 2 j: -4 substr(o1, 2, -4): <<>> +i: 2 j: -3 substr(o1, 2, -3): <<>> +i: 2 j: -2 substr(o1, 2, -2): <<>> +i: 2 j: -1 substr(o1, 2, -1): <<>> +i: 2 j: 0 substr(o1, 2, 0): <<>> +i: 2 j: 1 substr(o1, 2, 1): <<>> +i: 2 j: 2 substr(o1, 2, 2): <<>> +i: 2 j: 3 substr(o1, 2, 3): <<>> +i: 2 j: 4 substr(o1, 2, 4): <<>> + +i: 3 j: -4 substr(o1, 3, -4): <<>> +i: 3 j: -3 substr(o1, 3, -3): <<>> +i: 3 j: -2 substr(o1, 3, -2): <<>> +i: 3 j: -1 substr(o1, 3, -1): <<>> +i: 3 j: 0 substr(o1, 3, 0): <<>> +i: 3 j: 1 substr(o1, 3, 1): <<>> +i: 3 j: 2 substr(o1, 3, 2): <<>> +i: 3 j: 3 substr(o1, 3, 3): <<>> +i: 3 j: 4 substr(o1, 3, 4): <<>> + +i: 4 j: -4 substr(o1, 4, -4): <<>> +i: 4 j: -3 substr(o1, 4, -3): <<>> +i: 4 j: -2 substr(o1, 4, -2): <<>> +i: 4 j: -1 substr(o1, 4, -1): <<>> +i: 4 j: 0 substr(o1, 4, 0): <<>> +i: 4 j: 1 substr(o1, 4, 1): <<>> +i: 4 j: 2 substr(o1, 4, 2): <<>> +i: 4 j: 3 substr(o1, 4, 3): <<>> +i: 4 j: 4 substr(o1, 4, 4): <<>> + +input= <> +i: -12 j:-12 substr(o123456789,-12,-12): <<>> +i: -12 j:-11 substr(o123456789,-12,-11): <<>> +i: -12 j:-10 substr(o123456789,-12,-10): <<>> +i: -12 j: -9 substr(o123456789,-12, -9): <<>> +i: -12 j: -8 substr(o123456789,-12, -8): <<>> +i: -12 j: -7 substr(o123456789,-12, -7): <<>> +i: -12 j: -6 substr(o123456789,-12, -6): <<>> +i: -12 j: -5 substr(o123456789,-12, -5): <<>> +i: -12 j: -4 substr(o123456789,-12, -4): <<>> +i: -12 j: -3 substr(o123456789,-12, -3): <<>> +i: -12 j: -2 substr(o123456789,-12, -2): <<>> +i: -12 j: -1 substr(o123456789,-12, -1): <<>> +i: -12 j: 0 substr(o123456789,-12, 0): <<>> +i: -12 j: 1 substr(o123456789,-12, 1): <<>> +i: -12 j: 2 substr(o123456789,-12, 2): <<>> +i: -12 j: 3 substr(o123456789,-12, 3): <<>> +i: -12 j: 4 substr(o123456789,-12, 4): <<>> +i: -12 j: 5 substr(o123456789,-12, 5): <<>> +i: -12 j: 6 substr(o123456789,-12, 6): <<>> +i: -12 j: 7 substr(o123456789,-12, 7): <<>> +i: -12 j: 8 substr(o123456789,-12, 8): <<>> +i: -12 j: 9 substr(o123456789,-12, 9): <<>> +i: -12 j: 10 substr(o123456789,-12, 10): <<>> +i: -12 j: 11 substr(o123456789,-12, 11): <<>> +i: -12 j: 12 substr(o123456789,-12, 12): <<>> + +i: -11 j:-12 substr(o123456789,-11,-12): <<>> +i: -11 j:-11 substr(o123456789,-11,-11): <<>> +i: -11 j:-10 substr(o123456789,-11,-10): <<>> +i: -11 j: -9 substr(o123456789,-11, -9): <<>> +i: -11 j: -8 substr(o123456789,-11, -8): <<>> +i: -11 j: -7 substr(o123456789,-11, -7): <<>> +i: -11 j: -6 substr(o123456789,-11, -6): <<>> +i: -11 j: -5 substr(o123456789,-11, -5): <<>> +i: -11 j: -4 substr(o123456789,-11, -4): <<>> +i: -11 j: -3 substr(o123456789,-11, -3): <<>> +i: -11 j: -2 substr(o123456789,-11, -2): <<>> +i: -11 j: -1 substr(o123456789,-11, -1): <<>> +i: -11 j: 0 substr(o123456789,-11, 0): <<>> +i: -11 j: 1 substr(o123456789,-11, 1): <<>> +i: -11 j: 2 substr(o123456789,-11, 2): <<>> +i: -11 j: 3 substr(o123456789,-11, 3): <<>> +i: -11 j: 4 substr(o123456789,-11, 4): <<>> +i: -11 j: 5 substr(o123456789,-11, 5): <<>> +i: -11 j: 6 substr(o123456789,-11, 6): <<>> +i: -11 j: 7 substr(o123456789,-11, 7): <<>> +i: -11 j: 8 substr(o123456789,-11, 8): <<>> +i: -11 j: 9 substr(o123456789,-11, 9): <<>> +i: -11 j: 10 substr(o123456789,-11, 10): <<>> +i: -11 j: 11 substr(o123456789,-11, 11): <<>> +i: -11 j: 12 substr(o123456789,-11, 12): <<>> + +i: -10 j:-12 substr(o123456789,-10,-12): <<>> +i: -10 j:-11 substr(o123456789,-10,-11): <<>> +i: -10 j:-10 substr(o123456789,-10,-10): <> +i: -10 j: -9 substr(o123456789,-10, -9): <> +i: -10 j: -8 substr(o123456789,-10, -8): <> +i: -10 j: -7 substr(o123456789,-10, -7): <> +i: -10 j: -6 substr(o123456789,-10, -6): <> +i: -10 j: -5 substr(o123456789,-10, -5): <> +i: -10 j: -4 substr(o123456789,-10, -4): <> +i: -10 j: -3 substr(o123456789,-10, -3): <> +i: -10 j: -2 substr(o123456789,-10, -2): <> +i: -10 j: -1 substr(o123456789,-10, -1): <> +i: -10 j: 0 substr(o123456789,-10, 0): <> +i: -10 j: 1 substr(o123456789,-10, 1): <> +i: -10 j: 2 substr(o123456789,-10, 2): <> +i: -10 j: 3 substr(o123456789,-10, 3): <> +i: -10 j: 4 substr(o123456789,-10, 4): <> +i: -10 j: 5 substr(o123456789,-10, 5): <> +i: -10 j: 6 substr(o123456789,-10, 6): <> +i: -10 j: 7 substr(o123456789,-10, 7): <> +i: -10 j: 8 substr(o123456789,-10, 8): <> +i: -10 j: 9 substr(o123456789,-10, 9): <> +i: -10 j: 10 substr(o123456789,-10, 10): <<>> +i: -10 j: 11 substr(o123456789,-10, 11): <<>> +i: -10 j: 12 substr(o123456789,-10, 12): <<>> + +i: -9 j:-12 substr(o123456789, -9,-12): <<>> +i: -9 j:-11 substr(o123456789, -9,-11): <<>> +i: -9 j:-10 substr(o123456789, -9,-10): <<>> +i: -9 j: -9 substr(o123456789, -9, -9): <<1>> +i: -9 j: -8 substr(o123456789, -9, -8): <<12>> +i: -9 j: -7 substr(o123456789, -9, -7): <<123>> +i: -9 j: -6 substr(o123456789, -9, -6): <<1234>> +i: -9 j: -5 substr(o123456789, -9, -5): <<12345>> +i: -9 j: -4 substr(o123456789, -9, -4): <<123456>> +i: -9 j: -3 substr(o123456789, -9, -3): <<1234567>> +i: -9 j: -2 substr(o123456789, -9, -2): <<12345678>> +i: -9 j: -1 substr(o123456789, -9, -1): <<123456789>> +i: -9 j: 0 substr(o123456789, -9, 0): <<>> +i: -9 j: 1 substr(o123456789, -9, 1): <<1>> +i: -9 j: 2 substr(o123456789, -9, 2): <<12>> +i: -9 j: 3 substr(o123456789, -9, 3): <<123>> +i: -9 j: 4 substr(o123456789, -9, 4): <<1234>> +i: -9 j: 5 substr(o123456789, -9, 5): <<12345>> +i: -9 j: 6 substr(o123456789, -9, 6): <<123456>> +i: -9 j: 7 substr(o123456789, -9, 7): <<1234567>> +i: -9 j: 8 substr(o123456789, -9, 8): <<12345678>> +i: -9 j: 9 substr(o123456789, -9, 9): <<123456789>> +i: -9 j: 10 substr(o123456789, -9, 10): <<>> +i: -9 j: 11 substr(o123456789, -9, 11): <<>> +i: -9 j: 12 substr(o123456789, -9, 12): <<>> + +i: -8 j:-12 substr(o123456789, -8,-12): <<>> +i: -8 j:-11 substr(o123456789, -8,-11): <<>> +i: -8 j:-10 substr(o123456789, -8,-10): <<>> +i: -8 j: -9 substr(o123456789, -8, -9): <<>> +i: -8 j: -8 substr(o123456789, -8, -8): <<2>> +i: -8 j: -7 substr(o123456789, -8, -7): <<23>> +i: -8 j: -6 substr(o123456789, -8, -6): <<234>> +i: -8 j: -5 substr(o123456789, -8, -5): <<2345>> +i: -8 j: -4 substr(o123456789, -8, -4): <<23456>> +i: -8 j: -3 substr(o123456789, -8, -3): <<234567>> +i: -8 j: -2 substr(o123456789, -8, -2): <<2345678>> +i: -8 j: -1 substr(o123456789, -8, -1): <<23456789>> +i: -8 j: 0 substr(o123456789, -8, 0): <<>> +i: -8 j: 1 substr(o123456789, -8, 1): <<>> +i: -8 j: 2 substr(o123456789, -8, 2): <<2>> +i: -8 j: 3 substr(o123456789, -8, 3): <<23>> +i: -8 j: 4 substr(o123456789, -8, 4): <<234>> +i: -8 j: 5 substr(o123456789, -8, 5): <<2345>> +i: -8 j: 6 substr(o123456789, -8, 6): <<23456>> +i: -8 j: 7 substr(o123456789, -8, 7): <<234567>> +i: -8 j: 8 substr(o123456789, -8, 8): <<2345678>> +i: -8 j: 9 substr(o123456789, -8, 9): <<23456789>> +i: -8 j: 10 substr(o123456789, -8, 10): <<>> +i: -8 j: 11 substr(o123456789, -8, 11): <<>> +i: -8 j: 12 substr(o123456789, -8, 12): <<>> + +i: -7 j:-12 substr(o123456789, -7,-12): <<>> +i: -7 j:-11 substr(o123456789, -7,-11): <<>> +i: -7 j:-10 substr(o123456789, -7,-10): <<>> +i: -7 j: -9 substr(o123456789, -7, -9): <<>> +i: -7 j: -8 substr(o123456789, -7, -8): <<>> +i: -7 j: -7 substr(o123456789, -7, -7): <<3>> +i: -7 j: -6 substr(o123456789, -7, -6): <<34>> +i: -7 j: -5 substr(o123456789, -7, -5): <<345>> +i: -7 j: -4 substr(o123456789, -7, -4): <<3456>> +i: -7 j: -3 substr(o123456789, -7, -3): <<34567>> +i: -7 j: -2 substr(o123456789, -7, -2): <<345678>> +i: -7 j: -1 substr(o123456789, -7, -1): <<3456789>> +i: -7 j: 0 substr(o123456789, -7, 0): <<>> +i: -7 j: 1 substr(o123456789, -7, 1): <<>> +i: -7 j: 2 substr(o123456789, -7, 2): <<>> +i: -7 j: 3 substr(o123456789, -7, 3): <<3>> +i: -7 j: 4 substr(o123456789, -7, 4): <<34>> +i: -7 j: 5 substr(o123456789, -7, 5): <<345>> +i: -7 j: 6 substr(o123456789, -7, 6): <<3456>> +i: -7 j: 7 substr(o123456789, -7, 7): <<34567>> +i: -7 j: 8 substr(o123456789, -7, 8): <<345678>> +i: -7 j: 9 substr(o123456789, -7, 9): <<3456789>> +i: -7 j: 10 substr(o123456789, -7, 10): <<>> +i: -7 j: 11 substr(o123456789, -7, 11): <<>> +i: -7 j: 12 substr(o123456789, -7, 12): <<>> + +i: -6 j:-12 substr(o123456789, -6,-12): <<>> +i: -6 j:-11 substr(o123456789, -6,-11): <<>> +i: -6 j:-10 substr(o123456789, -6,-10): <<>> +i: -6 j: -9 substr(o123456789, -6, -9): <<>> +i: -6 j: -8 substr(o123456789, -6, -8): <<>> +i: -6 j: -7 substr(o123456789, -6, -7): <<>> +i: -6 j: -6 substr(o123456789, -6, -6): <<4>> +i: -6 j: -5 substr(o123456789, -6, -5): <<45>> +i: -6 j: -4 substr(o123456789, -6, -4): <<456>> +i: -6 j: -3 substr(o123456789, -6, -3): <<4567>> +i: -6 j: -2 substr(o123456789, -6, -2): <<45678>> +i: -6 j: -1 substr(o123456789, -6, -1): <<456789>> +i: -6 j: 0 substr(o123456789, -6, 0): <<>> +i: -6 j: 1 substr(o123456789, -6, 1): <<>> +i: -6 j: 2 substr(o123456789, -6, 2): <<>> +i: -6 j: 3 substr(o123456789, -6, 3): <<>> +i: -6 j: 4 substr(o123456789, -6, 4): <<4>> +i: -6 j: 5 substr(o123456789, -6, 5): <<45>> +i: -6 j: 6 substr(o123456789, -6, 6): <<456>> +i: -6 j: 7 substr(o123456789, -6, 7): <<4567>> +i: -6 j: 8 substr(o123456789, -6, 8): <<45678>> +i: -6 j: 9 substr(o123456789, -6, 9): <<456789>> +i: -6 j: 10 substr(o123456789, -6, 10): <<>> +i: -6 j: 11 substr(o123456789, -6, 11): <<>> +i: -6 j: 12 substr(o123456789, -6, 12): <<>> + +i: -5 j:-12 substr(o123456789, -5,-12): <<>> +i: -5 j:-11 substr(o123456789, -5,-11): <<>> +i: -5 j:-10 substr(o123456789, -5,-10): <<>> +i: -5 j: -9 substr(o123456789, -5, -9): <<>> +i: -5 j: -8 substr(o123456789, -5, -8): <<>> +i: -5 j: -7 substr(o123456789, -5, -7): <<>> +i: -5 j: -6 substr(o123456789, -5, -6): <<>> +i: -5 j: -5 substr(o123456789, -5, -5): <<5>> +i: -5 j: -4 substr(o123456789, -5, -4): <<56>> +i: -5 j: -3 substr(o123456789, -5, -3): <<567>> +i: -5 j: -2 substr(o123456789, -5, -2): <<5678>> +i: -5 j: -1 substr(o123456789, -5, -1): <<56789>> +i: -5 j: 0 substr(o123456789, -5, 0): <<>> +i: -5 j: 1 substr(o123456789, -5, 1): <<>> +i: -5 j: 2 substr(o123456789, -5, 2): <<>> +i: -5 j: 3 substr(o123456789, -5, 3): <<>> +i: -5 j: 4 substr(o123456789, -5, 4): <<>> +i: -5 j: 5 substr(o123456789, -5, 5): <<5>> +i: -5 j: 6 substr(o123456789, -5, 6): <<56>> +i: -5 j: 7 substr(o123456789, -5, 7): <<567>> +i: -5 j: 8 substr(o123456789, -5, 8): <<5678>> +i: -5 j: 9 substr(o123456789, -5, 9): <<56789>> +i: -5 j: 10 substr(o123456789, -5, 10): <<>> +i: -5 j: 11 substr(o123456789, -5, 11): <<>> +i: -5 j: 12 substr(o123456789, -5, 12): <<>> + +i: -4 j:-12 substr(o123456789, -4,-12): <<>> +i: -4 j:-11 substr(o123456789, -4,-11): <<>> +i: -4 j:-10 substr(o123456789, -4,-10): <<>> +i: -4 j: -9 substr(o123456789, -4, -9): <<>> +i: -4 j: -8 substr(o123456789, -4, -8): <<>> +i: -4 j: -7 substr(o123456789, -4, -7): <<>> +i: -4 j: -6 substr(o123456789, -4, -6): <<>> +i: -4 j: -5 substr(o123456789, -4, -5): <<>> +i: -4 j: -4 substr(o123456789, -4, -4): <<6>> +i: -4 j: -3 substr(o123456789, -4, -3): <<67>> +i: -4 j: -2 substr(o123456789, -4, -2): <<678>> +i: -4 j: -1 substr(o123456789, -4, -1): <<6789>> +i: -4 j: 0 substr(o123456789, -4, 0): <<>> +i: -4 j: 1 substr(o123456789, -4, 1): <<>> +i: -4 j: 2 substr(o123456789, -4, 2): <<>> +i: -4 j: 3 substr(o123456789, -4, 3): <<>> +i: -4 j: 4 substr(o123456789, -4, 4): <<>> +i: -4 j: 5 substr(o123456789, -4, 5): <<>> +i: -4 j: 6 substr(o123456789, -4, 6): <<6>> +i: -4 j: 7 substr(o123456789, -4, 7): <<67>> +i: -4 j: 8 substr(o123456789, -4, 8): <<678>> +i: -4 j: 9 substr(o123456789, -4, 9): <<6789>> +i: -4 j: 10 substr(o123456789, -4, 10): <<>> +i: -4 j: 11 substr(o123456789, -4, 11): <<>> +i: -4 j: 12 substr(o123456789, -4, 12): <<>> + +i: -3 j:-12 substr(o123456789, -3,-12): <<>> +i: -3 j:-11 substr(o123456789, -3,-11): <<>> +i: -3 j:-10 substr(o123456789, -3,-10): <<>> +i: -3 j: -9 substr(o123456789, -3, -9): <<>> +i: -3 j: -8 substr(o123456789, -3, -8): <<>> +i: -3 j: -7 substr(o123456789, -3, -7): <<>> +i: -3 j: -6 substr(o123456789, -3, -6): <<>> +i: -3 j: -5 substr(o123456789, -3, -5): <<>> +i: -3 j: -4 substr(o123456789, -3, -4): <<>> +i: -3 j: -3 substr(o123456789, -3, -3): <<7>> +i: -3 j: -2 substr(o123456789, -3, -2): <<78>> +i: -3 j: -1 substr(o123456789, -3, -1): <<789>> +i: -3 j: 0 substr(o123456789, -3, 0): <<>> +i: -3 j: 1 substr(o123456789, -3, 1): <<>> +i: -3 j: 2 substr(o123456789, -3, 2): <<>> +i: -3 j: 3 substr(o123456789, -3, 3): <<>> +i: -3 j: 4 substr(o123456789, -3, 4): <<>> +i: -3 j: 5 substr(o123456789, -3, 5): <<>> +i: -3 j: 6 substr(o123456789, -3, 6): <<>> +i: -3 j: 7 substr(o123456789, -3, 7): <<7>> +i: -3 j: 8 substr(o123456789, -3, 8): <<78>> +i: -3 j: 9 substr(o123456789, -3, 9): <<789>> +i: -3 j: 10 substr(o123456789, -3, 10): <<>> +i: -3 j: 11 substr(o123456789, -3, 11): <<>> +i: -3 j: 12 substr(o123456789, -3, 12): <<>> + +i: -2 j:-12 substr(o123456789, -2,-12): <<>> +i: -2 j:-11 substr(o123456789, -2,-11): <<>> +i: -2 j:-10 substr(o123456789, -2,-10): <<>> +i: -2 j: -9 substr(o123456789, -2, -9): <<>> +i: -2 j: -8 substr(o123456789, -2, -8): <<>> +i: -2 j: -7 substr(o123456789, -2, -7): <<>> +i: -2 j: -6 substr(o123456789, -2, -6): <<>> +i: -2 j: -5 substr(o123456789, -2, -5): <<>> +i: -2 j: -4 substr(o123456789, -2, -4): <<>> +i: -2 j: -3 substr(o123456789, -2, -3): <<>> +i: -2 j: -2 substr(o123456789, -2, -2): <<8>> +i: -2 j: -1 substr(o123456789, -2, -1): <<89>> +i: -2 j: 0 substr(o123456789, -2, 0): <<>> +i: -2 j: 1 substr(o123456789, -2, 1): <<>> +i: -2 j: 2 substr(o123456789, -2, 2): <<>> +i: -2 j: 3 substr(o123456789, -2, 3): <<>> +i: -2 j: 4 substr(o123456789, -2, 4): <<>> +i: -2 j: 5 substr(o123456789, -2, 5): <<>> +i: -2 j: 6 substr(o123456789, -2, 6): <<>> +i: -2 j: 7 substr(o123456789, -2, 7): <<>> +i: -2 j: 8 substr(o123456789, -2, 8): <<8>> +i: -2 j: 9 substr(o123456789, -2, 9): <<89>> +i: -2 j: 10 substr(o123456789, -2, 10): <<>> +i: -2 j: 11 substr(o123456789, -2, 11): <<>> +i: -2 j: 12 substr(o123456789, -2, 12): <<>> + +i: -1 j:-12 substr(o123456789, -1,-12): <<>> +i: -1 j:-11 substr(o123456789, -1,-11): <<>> +i: -1 j:-10 substr(o123456789, -1,-10): <<>> +i: -1 j: -9 substr(o123456789, -1, -9): <<>> +i: -1 j: -8 substr(o123456789, -1, -8): <<>> +i: -1 j: -7 substr(o123456789, -1, -7): <<>> +i: -1 j: -6 substr(o123456789, -1, -6): <<>> +i: -1 j: -5 substr(o123456789, -1, -5): <<>> +i: -1 j: -4 substr(o123456789, -1, -4): <<>> +i: -1 j: -3 substr(o123456789, -1, -3): <<>> +i: -1 j: -2 substr(o123456789, -1, -2): <<>> +i: -1 j: -1 substr(o123456789, -1, -1): <<9>> +i: -1 j: 0 substr(o123456789, -1, 0): <<>> +i: -1 j: 1 substr(o123456789, -1, 1): <<>> +i: -1 j: 2 substr(o123456789, -1, 2): <<>> +i: -1 j: 3 substr(o123456789, -1, 3): <<>> +i: -1 j: 4 substr(o123456789, -1, 4): <<>> +i: -1 j: 5 substr(o123456789, -1, 5): <<>> +i: -1 j: 6 substr(o123456789, -1, 6): <<>> +i: -1 j: 7 substr(o123456789, -1, 7): <<>> +i: -1 j: 8 substr(o123456789, -1, 8): <<>> +i: -1 j: 9 substr(o123456789, -1, 9): <<9>> +i: -1 j: 10 substr(o123456789, -1, 10): <<>> +i: -1 j: 11 substr(o123456789, -1, 11): <<>> +i: -1 j: 12 substr(o123456789, -1, 12): <<>> + +i: 0 j:-12 substr(o123456789, 0,-12): <<>> +i: 0 j:-11 substr(o123456789, 0,-11): <<>> +i: 0 j:-10 substr(o123456789, 0,-10): <> +i: 0 j: -9 substr(o123456789, 0, -9): <> +i: 0 j: -8 substr(o123456789, 0, -8): <> +i: 0 j: -7 substr(o123456789, 0, -7): <> +i: 0 j: -6 substr(o123456789, 0, -6): <> +i: 0 j: -5 substr(o123456789, 0, -5): <> +i: 0 j: -4 substr(o123456789, 0, -4): <> +i: 0 j: -3 substr(o123456789, 0, -3): <> +i: 0 j: -2 substr(o123456789, 0, -2): <> +i: 0 j: -1 substr(o123456789, 0, -1): <> +i: 0 j: 0 substr(o123456789, 0, 0): <> +i: 0 j: 1 substr(o123456789, 0, 1): <> +i: 0 j: 2 substr(o123456789, 0, 2): <> +i: 0 j: 3 substr(o123456789, 0, 3): <> +i: 0 j: 4 substr(o123456789, 0, 4): <> +i: 0 j: 5 substr(o123456789, 0, 5): <> +i: 0 j: 6 substr(o123456789, 0, 6): <> +i: 0 j: 7 substr(o123456789, 0, 7): <> +i: 0 j: 8 substr(o123456789, 0, 8): <> +i: 0 j: 9 substr(o123456789, 0, 9): <> +i: 0 j: 10 substr(o123456789, 0, 10): <<>> +i: 0 j: 11 substr(o123456789, 0, 11): <<>> +i: 0 j: 12 substr(o123456789, 0, 12): <<>> + +i: 1 j:-12 substr(o123456789, 1,-12): <<>> +i: 1 j:-11 substr(o123456789, 1,-11): <<>> +i: 1 j:-10 substr(o123456789, 1,-10): <<>> +i: 1 j: -9 substr(o123456789, 1, -9): <<1>> +i: 1 j: -8 substr(o123456789, 1, -8): <<12>> +i: 1 j: -7 substr(o123456789, 1, -7): <<123>> +i: 1 j: -6 substr(o123456789, 1, -6): <<1234>> +i: 1 j: -5 substr(o123456789, 1, -5): <<12345>> +i: 1 j: -4 substr(o123456789, 1, -4): <<123456>> +i: 1 j: -3 substr(o123456789, 1, -3): <<1234567>> +i: 1 j: -2 substr(o123456789, 1, -2): <<12345678>> +i: 1 j: -1 substr(o123456789, 1, -1): <<123456789>> +i: 1 j: 0 substr(o123456789, 1, 0): <<>> +i: 1 j: 1 substr(o123456789, 1, 1): <<1>> +i: 1 j: 2 substr(o123456789, 1, 2): <<12>> +i: 1 j: 3 substr(o123456789, 1, 3): <<123>> +i: 1 j: 4 substr(o123456789, 1, 4): <<1234>> +i: 1 j: 5 substr(o123456789, 1, 5): <<12345>> +i: 1 j: 6 substr(o123456789, 1, 6): <<123456>> +i: 1 j: 7 substr(o123456789, 1, 7): <<1234567>> +i: 1 j: 8 substr(o123456789, 1, 8): <<12345678>> +i: 1 j: 9 substr(o123456789, 1, 9): <<123456789>> +i: 1 j: 10 substr(o123456789, 1, 10): <<>> +i: 1 j: 11 substr(o123456789, 1, 11): <<>> +i: 1 j: 12 substr(o123456789, 1, 12): <<>> + +i: 2 j:-12 substr(o123456789, 2,-12): <<>> +i: 2 j:-11 substr(o123456789, 2,-11): <<>> +i: 2 j:-10 substr(o123456789, 2,-10): <<>> +i: 2 j: -9 substr(o123456789, 2, -9): <<>> +i: 2 j: -8 substr(o123456789, 2, -8): <<2>> +i: 2 j: -7 substr(o123456789, 2, -7): <<23>> +i: 2 j: -6 substr(o123456789, 2, -6): <<234>> +i: 2 j: -5 substr(o123456789, 2, -5): <<2345>> +i: 2 j: -4 substr(o123456789, 2, -4): <<23456>> +i: 2 j: -3 substr(o123456789, 2, -3): <<234567>> +i: 2 j: -2 substr(o123456789, 2, -2): <<2345678>> +i: 2 j: -1 substr(o123456789, 2, -1): <<23456789>> +i: 2 j: 0 substr(o123456789, 2, 0): <<>> +i: 2 j: 1 substr(o123456789, 2, 1): <<>> +i: 2 j: 2 substr(o123456789, 2, 2): <<2>> +i: 2 j: 3 substr(o123456789, 2, 3): <<23>> +i: 2 j: 4 substr(o123456789, 2, 4): <<234>> +i: 2 j: 5 substr(o123456789, 2, 5): <<2345>> +i: 2 j: 6 substr(o123456789, 2, 6): <<23456>> +i: 2 j: 7 substr(o123456789, 2, 7): <<234567>> +i: 2 j: 8 substr(o123456789, 2, 8): <<2345678>> +i: 2 j: 9 substr(o123456789, 2, 9): <<23456789>> +i: 2 j: 10 substr(o123456789, 2, 10): <<>> +i: 2 j: 11 substr(o123456789, 2, 11): <<>> +i: 2 j: 12 substr(o123456789, 2, 12): <<>> + +i: 3 j:-12 substr(o123456789, 3,-12): <<>> +i: 3 j:-11 substr(o123456789, 3,-11): <<>> +i: 3 j:-10 substr(o123456789, 3,-10): <<>> +i: 3 j: -9 substr(o123456789, 3, -9): <<>> +i: 3 j: -8 substr(o123456789, 3, -8): <<>> +i: 3 j: -7 substr(o123456789, 3, -7): <<3>> +i: 3 j: -6 substr(o123456789, 3, -6): <<34>> +i: 3 j: -5 substr(o123456789, 3, -5): <<345>> +i: 3 j: -4 substr(o123456789, 3, -4): <<3456>> +i: 3 j: -3 substr(o123456789, 3, -3): <<34567>> +i: 3 j: -2 substr(o123456789, 3, -2): <<345678>> +i: 3 j: -1 substr(o123456789, 3, -1): <<3456789>> +i: 3 j: 0 substr(o123456789, 3, 0): <<>> +i: 3 j: 1 substr(o123456789, 3, 1): <<>> +i: 3 j: 2 substr(o123456789, 3, 2): <<>> +i: 3 j: 3 substr(o123456789, 3, 3): <<3>> +i: 3 j: 4 substr(o123456789, 3, 4): <<34>> +i: 3 j: 5 substr(o123456789, 3, 5): <<345>> +i: 3 j: 6 substr(o123456789, 3, 6): <<3456>> +i: 3 j: 7 substr(o123456789, 3, 7): <<34567>> +i: 3 j: 8 substr(o123456789, 3, 8): <<345678>> +i: 3 j: 9 substr(o123456789, 3, 9): <<3456789>> +i: 3 j: 10 substr(o123456789, 3, 10): <<>> +i: 3 j: 11 substr(o123456789, 3, 11): <<>> +i: 3 j: 12 substr(o123456789, 3, 12): <<>> + +i: 4 j:-12 substr(o123456789, 4,-12): <<>> +i: 4 j:-11 substr(o123456789, 4,-11): <<>> +i: 4 j:-10 substr(o123456789, 4,-10): <<>> +i: 4 j: -9 substr(o123456789, 4, -9): <<>> +i: 4 j: -8 substr(o123456789, 4, -8): <<>> +i: 4 j: -7 substr(o123456789, 4, -7): <<>> +i: 4 j: -6 substr(o123456789, 4, -6): <<4>> +i: 4 j: -5 substr(o123456789, 4, -5): <<45>> +i: 4 j: -4 substr(o123456789, 4, -4): <<456>> +i: 4 j: -3 substr(o123456789, 4, -3): <<4567>> +i: 4 j: -2 substr(o123456789, 4, -2): <<45678>> +i: 4 j: -1 substr(o123456789, 4, -1): <<456789>> +i: 4 j: 0 substr(o123456789, 4, 0): <<>> +i: 4 j: 1 substr(o123456789, 4, 1): <<>> +i: 4 j: 2 substr(o123456789, 4, 2): <<>> +i: 4 j: 3 substr(o123456789, 4, 3): <<>> +i: 4 j: 4 substr(o123456789, 4, 4): <<4>> +i: 4 j: 5 substr(o123456789, 4, 5): <<45>> +i: 4 j: 6 substr(o123456789, 4, 6): <<456>> +i: 4 j: 7 substr(o123456789, 4, 7): <<4567>> +i: 4 j: 8 substr(o123456789, 4, 8): <<45678>> +i: 4 j: 9 substr(o123456789, 4, 9): <<456789>> +i: 4 j: 10 substr(o123456789, 4, 10): <<>> +i: 4 j: 11 substr(o123456789, 4, 11): <<>> +i: 4 j: 12 substr(o123456789, 4, 12): <<>> + +i: 5 j:-12 substr(o123456789, 5,-12): <<>> +i: 5 j:-11 substr(o123456789, 5,-11): <<>> +i: 5 j:-10 substr(o123456789, 5,-10): <<>> +i: 5 j: -9 substr(o123456789, 5, -9): <<>> +i: 5 j: -8 substr(o123456789, 5, -8): <<>> +i: 5 j: -7 substr(o123456789, 5, -7): <<>> +i: 5 j: -6 substr(o123456789, 5, -6): <<>> +i: 5 j: -5 substr(o123456789, 5, -5): <<5>> +i: 5 j: -4 substr(o123456789, 5, -4): <<56>> +i: 5 j: -3 substr(o123456789, 5, -3): <<567>> +i: 5 j: -2 substr(o123456789, 5, -2): <<5678>> +i: 5 j: -1 substr(o123456789, 5, -1): <<56789>> +i: 5 j: 0 substr(o123456789, 5, 0): <<>> +i: 5 j: 1 substr(o123456789, 5, 1): <<>> +i: 5 j: 2 substr(o123456789, 5, 2): <<>> +i: 5 j: 3 substr(o123456789, 5, 3): <<>> +i: 5 j: 4 substr(o123456789, 5, 4): <<>> +i: 5 j: 5 substr(o123456789, 5, 5): <<5>> +i: 5 j: 6 substr(o123456789, 5, 6): <<56>> +i: 5 j: 7 substr(o123456789, 5, 7): <<567>> +i: 5 j: 8 substr(o123456789, 5, 8): <<5678>> +i: 5 j: 9 substr(o123456789, 5, 9): <<56789>> +i: 5 j: 10 substr(o123456789, 5, 10): <<>> +i: 5 j: 11 substr(o123456789, 5, 11): <<>> +i: 5 j: 12 substr(o123456789, 5, 12): <<>> + +i: 6 j:-12 substr(o123456789, 6,-12): <<>> +i: 6 j:-11 substr(o123456789, 6,-11): <<>> +i: 6 j:-10 substr(o123456789, 6,-10): <<>> +i: 6 j: -9 substr(o123456789, 6, -9): <<>> +i: 6 j: -8 substr(o123456789, 6, -8): <<>> +i: 6 j: -7 substr(o123456789, 6, -7): <<>> +i: 6 j: -6 substr(o123456789, 6, -6): <<>> +i: 6 j: -5 substr(o123456789, 6, -5): <<>> +i: 6 j: -4 substr(o123456789, 6, -4): <<6>> +i: 6 j: -3 substr(o123456789, 6, -3): <<67>> +i: 6 j: -2 substr(o123456789, 6, -2): <<678>> +i: 6 j: -1 substr(o123456789, 6, -1): <<6789>> +i: 6 j: 0 substr(o123456789, 6, 0): <<>> +i: 6 j: 1 substr(o123456789, 6, 1): <<>> +i: 6 j: 2 substr(o123456789, 6, 2): <<>> +i: 6 j: 3 substr(o123456789, 6, 3): <<>> +i: 6 j: 4 substr(o123456789, 6, 4): <<>> +i: 6 j: 5 substr(o123456789, 6, 5): <<>> +i: 6 j: 6 substr(o123456789, 6, 6): <<6>> +i: 6 j: 7 substr(o123456789, 6, 7): <<67>> +i: 6 j: 8 substr(o123456789, 6, 8): <<678>> +i: 6 j: 9 substr(o123456789, 6, 9): <<6789>> +i: 6 j: 10 substr(o123456789, 6, 10): <<>> +i: 6 j: 11 substr(o123456789, 6, 11): <<>> +i: 6 j: 12 substr(o123456789, 6, 12): <<>> + +i: 7 j:-12 substr(o123456789, 7,-12): <<>> +i: 7 j:-11 substr(o123456789, 7,-11): <<>> +i: 7 j:-10 substr(o123456789, 7,-10): <<>> +i: 7 j: -9 substr(o123456789, 7, -9): <<>> +i: 7 j: -8 substr(o123456789, 7, -8): <<>> +i: 7 j: -7 substr(o123456789, 7, -7): <<>> +i: 7 j: -6 substr(o123456789, 7, -6): <<>> +i: 7 j: -5 substr(o123456789, 7, -5): <<>> +i: 7 j: -4 substr(o123456789, 7, -4): <<>> +i: 7 j: -3 substr(o123456789, 7, -3): <<7>> +i: 7 j: -2 substr(o123456789, 7, -2): <<78>> +i: 7 j: -1 substr(o123456789, 7, -1): <<789>> +i: 7 j: 0 substr(o123456789, 7, 0): <<>> +i: 7 j: 1 substr(o123456789, 7, 1): <<>> +i: 7 j: 2 substr(o123456789, 7, 2): <<>> +i: 7 j: 3 substr(o123456789, 7, 3): <<>> +i: 7 j: 4 substr(o123456789, 7, 4): <<>> +i: 7 j: 5 substr(o123456789, 7, 5): <<>> +i: 7 j: 6 substr(o123456789, 7, 6): <<>> +i: 7 j: 7 substr(o123456789, 7, 7): <<7>> +i: 7 j: 8 substr(o123456789, 7, 8): <<78>> +i: 7 j: 9 substr(o123456789, 7, 9): <<789>> +i: 7 j: 10 substr(o123456789, 7, 10): <<>> +i: 7 j: 11 substr(o123456789, 7, 11): <<>> +i: 7 j: 12 substr(o123456789, 7, 12): <<>> + +i: 8 j:-12 substr(o123456789, 8,-12): <<>> +i: 8 j:-11 substr(o123456789, 8,-11): <<>> +i: 8 j:-10 substr(o123456789, 8,-10): <<>> +i: 8 j: -9 substr(o123456789, 8, -9): <<>> +i: 8 j: -8 substr(o123456789, 8, -8): <<>> +i: 8 j: -7 substr(o123456789, 8, -7): <<>> +i: 8 j: -6 substr(o123456789, 8, -6): <<>> +i: 8 j: -5 substr(o123456789, 8, -5): <<>> +i: 8 j: -4 substr(o123456789, 8, -4): <<>> +i: 8 j: -3 substr(o123456789, 8, -3): <<>> +i: 8 j: -2 substr(o123456789, 8, -2): <<8>> +i: 8 j: -1 substr(o123456789, 8, -1): <<89>> +i: 8 j: 0 substr(o123456789, 8, 0): <<>> +i: 8 j: 1 substr(o123456789, 8, 1): <<>> +i: 8 j: 2 substr(o123456789, 8, 2): <<>> +i: 8 j: 3 substr(o123456789, 8, 3): <<>> +i: 8 j: 4 substr(o123456789, 8, 4): <<>> +i: 8 j: 5 substr(o123456789, 8, 5): <<>> +i: 8 j: 6 substr(o123456789, 8, 6): <<>> +i: 8 j: 7 substr(o123456789, 8, 7): <<>> +i: 8 j: 8 substr(o123456789, 8, 8): <<8>> +i: 8 j: 9 substr(o123456789, 8, 9): <<89>> +i: 8 j: 10 substr(o123456789, 8, 10): <<>> +i: 8 j: 11 substr(o123456789, 8, 11): <<>> +i: 8 j: 12 substr(o123456789, 8, 12): <<>> + +i: 9 j:-12 substr(o123456789, 9,-12): <<>> +i: 9 j:-11 substr(o123456789, 9,-11): <<>> +i: 9 j:-10 substr(o123456789, 9,-10): <<>> +i: 9 j: -9 substr(o123456789, 9, -9): <<>> +i: 9 j: -8 substr(o123456789, 9, -8): <<>> +i: 9 j: -7 substr(o123456789, 9, -7): <<>> +i: 9 j: -6 substr(o123456789, 9, -6): <<>> +i: 9 j: -5 substr(o123456789, 9, -5): <<>> +i: 9 j: -4 substr(o123456789, 9, -4): <<>> +i: 9 j: -3 substr(o123456789, 9, -3): <<>> +i: 9 j: -2 substr(o123456789, 9, -2): <<>> +i: 9 j: -1 substr(o123456789, 9, -1): <<9>> +i: 9 j: 0 substr(o123456789, 9, 0): <<>> +i: 9 j: 1 substr(o123456789, 9, 1): <<>> +i: 9 j: 2 substr(o123456789, 9, 2): <<>> +i: 9 j: 3 substr(o123456789, 9, 3): <<>> +i: 9 j: 4 substr(o123456789, 9, 4): <<>> +i: 9 j: 5 substr(o123456789, 9, 5): <<>> +i: 9 j: 6 substr(o123456789, 9, 6): <<>> +i: 9 j: 7 substr(o123456789, 9, 7): <<>> +i: 9 j: 8 substr(o123456789, 9, 8): <<>> +i: 9 j: 9 substr(o123456789, 9, 9): <<9>> +i: 9 j: 10 substr(o123456789, 9, 10): <<>> +i: 9 j: 11 substr(o123456789, 9, 11): <<>> +i: 9 j: 12 substr(o123456789, 9, 12): <<>> + +i: 10 j:-12 substr(o123456789, 10,-12): <<>> +i: 10 j:-11 substr(o123456789, 10,-11): <<>> +i: 10 j:-10 substr(o123456789, 10,-10): <<>> +i: 10 j: -9 substr(o123456789, 10, -9): <<>> +i: 10 j: -8 substr(o123456789, 10, -8): <<>> +i: 10 j: -7 substr(o123456789, 10, -7): <<>> +i: 10 j: -6 substr(o123456789, 10, -6): <<>> +i: 10 j: -5 substr(o123456789, 10, -5): <<>> +i: 10 j: -4 substr(o123456789, 10, -4): <<>> +i: 10 j: -3 substr(o123456789, 10, -3): <<>> +i: 10 j: -2 substr(o123456789, 10, -2): <<>> +i: 10 j: -1 substr(o123456789, 10, -1): <<>> +i: 10 j: 0 substr(o123456789, 10, 0): <<>> +i: 10 j: 1 substr(o123456789, 10, 1): <<>> +i: 10 j: 2 substr(o123456789, 10, 2): <<>> +i: 10 j: 3 substr(o123456789, 10, 3): <<>> +i: 10 j: 4 substr(o123456789, 10, 4): <<>> +i: 10 j: 5 substr(o123456789, 10, 5): <<>> +i: 10 j: 6 substr(o123456789, 10, 6): <<>> +i: 10 j: 7 substr(o123456789, 10, 7): <<>> +i: 10 j: 8 substr(o123456789, 10, 8): <<>> +i: 10 j: 9 substr(o123456789, 10, 9): <<>> +i: 10 j: 10 substr(o123456789, 10, 10): <<>> +i: 10 j: 11 substr(o123456789, 10, 11): <<>> +i: 10 j: 12 substr(o123456789, 10, 12): <<>> + +i: 11 j:-12 substr(o123456789, 11,-12): <<>> +i: 11 j:-11 substr(o123456789, 11,-11): <<>> +i: 11 j:-10 substr(o123456789, 11,-10): <<>> +i: 11 j: -9 substr(o123456789, 11, -9): <<>> +i: 11 j: -8 substr(o123456789, 11, -8): <<>> +i: 11 j: -7 substr(o123456789, 11, -7): <<>> +i: 11 j: -6 substr(o123456789, 11, -6): <<>> +i: 11 j: -5 substr(o123456789, 11, -5): <<>> +i: 11 j: -4 substr(o123456789, 11, -4): <<>> +i: 11 j: -3 substr(o123456789, 11, -3): <<>> +i: 11 j: -2 substr(o123456789, 11, -2): <<>> +i: 11 j: -1 substr(o123456789, 11, -1): <<>> +i: 11 j: 0 substr(o123456789, 11, 0): <<>> +i: 11 j: 1 substr(o123456789, 11, 1): <<>> +i: 11 j: 2 substr(o123456789, 11, 2): <<>> +i: 11 j: 3 substr(o123456789, 11, 3): <<>> +i: 11 j: 4 substr(o123456789, 11, 4): <<>> +i: 11 j: 5 substr(o123456789, 11, 5): <<>> +i: 11 j: 6 substr(o123456789, 11, 6): <<>> +i: 11 j: 7 substr(o123456789, 11, 7): <<>> +i: 11 j: 8 substr(o123456789, 11, 8): <<>> +i: 11 j: 9 substr(o123456789, 11, 9): <<>> +i: 11 j: 10 substr(o123456789, 11, 10): <<>> +i: 11 j: 11 substr(o123456789, 11, 11): <<>> +i: 11 j: 12 substr(o123456789, 11, 12): <<>> + +i: 12 j:-12 substr(o123456789, 12,-12): <<>> +i: 12 j:-11 substr(o123456789, 12,-11): <<>> +i: 12 j:-10 substr(o123456789, 12,-10): <<>> +i: 12 j: -9 substr(o123456789, 12, -9): <<>> +i: 12 j: -8 substr(o123456789, 12, -8): <<>> +i: 12 j: -7 substr(o123456789, 12, -7): <<>> +i: 12 j: -6 substr(o123456789, 12, -6): <<>> +i: 12 j: -5 substr(o123456789, 12, -5): <<>> +i: 12 j: -4 substr(o123456789, 12, -4): <<>> +i: 12 j: -3 substr(o123456789, 12, -3): <<>> +i: 12 j: -2 substr(o123456789, 12, -2): <<>> +i: 12 j: -1 substr(o123456789, 12, -1): <<>> +i: 12 j: 0 substr(o123456789, 12, 0): <<>> +i: 12 j: 1 substr(o123456789, 12, 1): <<>> +i: 12 j: 2 substr(o123456789, 12, 2): <<>> +i: 12 j: 3 substr(o123456789, 12, 3): <<>> +i: 12 j: 4 substr(o123456789, 12, 4): <<>> +i: 12 j: 5 substr(o123456789, 12, 5): <<>> +i: 12 j: 6 substr(o123456789, 12, 6): <<>> +i: 12 j: 7 substr(o123456789, 12, 7): <<>> +i: 12 j: 8 substr(o123456789, 12, 8): <<>> +i: 12 j: 9 substr(o123456789, 12, 9): <<>> +i: 12 j: 10 substr(o123456789, 12, 10): <<>> +i: 12 j: 11 substr(o123456789, 12, 11): <<>> +i: 12 j: 12 substr(o123456789, 12, 12): <<>> + + diff --git a/c/reg_test/expected/case-dsl-utf8-uppercase-lowercase.sh.out b/c/reg_test/expected/case-dsl-utf8-uppercase-lowercase.sh.out new file mode 100644 index 000000000..05000efad --- /dev/null +++ b/c/reg_test/expected/case-dsl-utf8-uppercase-lowercase.sh.out @@ -0,0 +1,31 @@ + +mlr --icsvlite --opprint put $langue = toupper($langue) ./reg_test/input/utf8-1.csv +langue nom jour +FRANÇAIS françois vendredi +ŽUSZ éloignée - + +mlr --icsvlite --opprint put $nom = toupper($nom) ./reg_test/input/utf8-1.csv +langue nom jour +français FRANÇOIS vendredi +žusz ÉLOIGNÉE - + +mlr --icsvlite --opprint put $jour = toupper($jour) ./reg_test/input/utf8-1.csv +langue nom jour +français françois VENDREDI +žusz éloignée - + +mlr --icsvlite --opprint put $langue = capitalize($langue) ./reg_test/input/utf8-1.csv +langue nom jour +Français françois vendredi +Žusz éloignée - + +mlr --icsvlite --opprint put $nom = capitalize($nom) ./reg_test/input/utf8-1.csv +langue nom jour +français François vendredi +žusz Éloignée - + +mlr --icsvlite --opprint put $jour = capitalize($jour) ./reg_test/input/utf8-1.csv +langue nom jour +français françois Vendredi +žusz éloignée - + diff --git a/c/reg_test/expected/case-in-place-processing.sh.out b/c/reg_test/expected/case-in-place-processing.sh.out index 0050a28a6..54e018673 100644 --- a/c/reg_test/expected/case-in-place-processing.sh.out +++ b/c/reg_test/expected/case-in-place-processing.sh.out @@ -26,3 +26,70 @@ a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 mlr -I --opprint head -n 2 /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp2 cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 +a b i x y +pan pan 1 0.3467901443380824 0.7268028627434533 +eks pan 2 0.7586799647899636 0.5221511083334797 + +cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp2 +a b i x y +pan pan 1 0.3467901443380824 0.7268028627434533 +eks pan 2 0.7586799647899636 0.5221511083334797 + +mlr -I --opprint head -n 2 +mlr: -I option (in-place operation) requires input files. + +mlr -I --opprint -n head -n 2 /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 +mlr: -I option (in-place operation) requires input files. + +cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp2 +a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533 +a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797 +a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776 +a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463 +a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729 +a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697 +a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694 +a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006 +a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059 +a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864 + +mlr -I --opprint rename a,AYE,b,BEE /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp2 + +cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp1 +AYE BEE i x y +pan pan 1 0.3467901443380824 0.7268028627434533 +eks pan 2 0.7586799647899636 0.5221511083334797 +wye wye 3 0.20460330576630303 0.33831852551664776 +eks wye 4 0.38139939387114097 0.13418874328430463 +wye pan 5 0.5732889198020006 0.8636244699032729 +zee pan 6 0.5271261600918548 0.49322128674835697 +eks zee 7 0.6117840605678454 0.1878849191181694 +zee wye 8 0.5985540091064224 0.976181385699006 +hat wye 9 0.03144187646093577 0.7495507603507059 +pan wye 10 0.5026260055412137 0.9526183602969864 + +cat /Users/kerl/pub_http_internet/miller-releases/miller-head/c/output-regtest/abixy.temp2 +AYE BEE i x y +pan pan 1 0.3467901443380824 0.7268028627434533 +eks pan 2 0.7586799647899636 0.5221511083334797 +wye wye 3 0.20460330576630303 0.33831852551664776 +eks wye 4 0.38139939387114097 0.13418874328430463 +wye pan 5 0.5732889198020006 0.8636244699032729 +zee pan 6 0.5271261600918548 0.49322128674835697 +eks zee 7 0.6117840605678454 0.1878849191181694 +zee wye 8 0.5985540091064224 0.976181385699006 +hat wye 9 0.03144187646093577 0.7495507603507059 +pan wye 10 0.5026260055412137 0.9526183602969864 + diff --git a/c/reg_test/expected/case-utf8-bom.sh.out b/c/reg_test/expected/case-utf8-bom.sh.out new file mode 100644 index 000000000..5e1a5fbf5 --- /dev/null +++ b/c/reg_test/expected/case-utf8-bom.sh.out @@ -0,0 +1,21 @@ + +mlr --icsv --opprint cat ./reg_test/input/bom.csv +a b c +1 2 3 +4 5 6 + +mlr --icsv --opprint cat +a b c +1 2 3 +4 5 6 + +mlr --icsv --opprint cat ./reg_test/input/bom-dquote-header.csv +a b c +1 2 3 +4 5 6 + +mlr --icsv --opprint cat +a b c +1 2 3 +4 5 6 +