diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index 59a1bff8f..51b084467 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -46535,3 +46535,59 @@ a=hat,b=wye,i=9,x=0.03144187646093577,y=45 } 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 +} + diff --git a/c/reg_test/run b/c/reg_test/run index 8993ad892..d0d4c72c8 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -5488,6 +5488,10 @@ run_mlr --from $indir/abixy put ' $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' + # ================================================================ # A key feature of this regression script is that it can be invoked from any # directory. Depending on the directory it's invoked from, the path to $outdir