diff --git a/go/gg b/go/gg index 93db9424f..8910248ee 100755 --- a/go/gg +++ b/go/gg @@ -52,6 +52,7 @@ mention() { # ================================================================ -run_mlr --oxtab fraction -f x,y -g a -p -c ./reg-test/input/abixy-het +mlr --from ./reg-test/input/abixy put '@o[1][2][3] = 7; for(k1,v in @o[1][2]) {$x+=10;$y+=100}' +mlr --from ./reg-test/input/xyz2 put -q 'map o = @o; dump o' # ================================================================ diff --git a/go/reg-test/cases/case-c-dsl-mapvar-assignments.sh b/go/reg-test/cases/case-dsl-mapvar-assignments.sh similarity index 100% rename from go/reg-test/cases/case-c-dsl-mapvar-assignments.sh rename to go/reg-test/cases/case-dsl-mapvar-assignments.sh diff --git a/go/reg-test/expected/case-c-dsl-mapvar-assignments.sh.out b/go/reg-test/expected/case-dsl-mapvar-assignments.sh.out similarity index 97% rename from go/reg-test/expected/case-c-dsl-mapvar-assignments.sh.out rename to go/reg-test/expected/case-dsl-mapvar-assignments.sh.out index f84f5642c..3fe484605 100644 --- a/go/reg-test/expected/case-c-dsl-mapvar-assignments.sh.out +++ b/go/reg-test/expected/case-dsl-mapvar-assignments.sh.out @@ -4,52 +4,49 @@ MAPVAR ASSIGNMENTS TO FULL SREC mlr --from ./reg-test/input/xyz2 put $* = {"a":1, "b": {"x":8,"y":9}, "c":3} -a=1,c=3 -a=1,c=3 +a=1,b.x=8,b.y=9,c=3 +a=1,b.x=8,b.y=9,c=3 mlr --from ./reg-test/input/xyz2 put $* = $* x=3,y=4,z=5 x=6,y=7,u=8 mlr --from ./reg-test/input/xyz2 put @a = 1; $* = @a - - +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put @b[1] = 2; $* = @b 1=2 1=2 mlr --from ./reg-test/input/xyz2 put @c[1][2] = 3; $* = @c - - +1.2=3 +1.2=3 mlr --from ./reg-test/input/xyz2 put @a = 1; $* = @* a=1 a=1 mlr --from ./reg-test/input/xyz2 put @b[1] = 2; $* = @* - - +b.1=2 +b.1=2 mlr --from ./reg-test/input/xyz2 put @c[1][2] = 3; $* = @* - - +c.1.2=3 +c.1.2=3 mlr --from ./reg-test/input/xyz2 put a = 1; $* = a - - +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put b[1] = 2; $* = b 1=2 1=2 mlr --from ./reg-test/input/xyz2 put c[1][2] = 3; $* = c - - +1.2=3 +1.2=3 mlr --from ./reg-test/input/xyz2 put $* = 3 - - +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put func map_valued_func() { @@ -145,12 +142,7 @@ x=3,y=4,z=5 x=6,y=7,u=8 mlr --from ./reg-test/input/xyz2 put @a = 1; @* = @a; dump -{ -} -x=3,y=4,z=5 -{ -} -x=6,y=7,u=8 +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put @b[1] = 2; @* = @b; dump { @@ -219,12 +211,7 @@ x=3,y=4,z=5 x=6,y=7,u=8 mlr --from ./reg-test/input/xyz2 put a = 1; @* = a; dump -{ -} -x=3,y=4,z=5 -{ -} -x=6,y=7,u=8 +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put b[1] = 2; @* = b; dump { @@ -251,8 +238,7 @@ x=3,y=4,z=5 x=6,y=7,u=8 mlr --from ./reg-test/input/xyz2 put @* = 3 -x=3,y=4,z=5 -x=6,y=7,u=8 +Exit status was 1; expected 0. mlr --from ./reg-test/input/xyz2 put func map_valued_func() { @@ -315,8 +301,6 @@ mlr --from ./reg-test/input/xyz2 put -q @o = {"a":1, "b": {"x":8,"y":9}, "c":3}; mlr --from ./reg-test/input/xyz2 put -q @o = @o; dump @o - - mlr --from ./reg-test/input/xyz2 put -q @o = {"a":1, "b": {"x":8,"y":9}, "c":3}; dump; @o = @*; dump { "o": { @@ -559,7 +543,7 @@ mlr --from ./reg-test/input/xyz2 put -q map o = {"a":1, "b": {"x":8,"y":9}, "c": } mlr --from ./reg-test/input/xyz2 put -q map o = @o; dump o -mlr: map type assertion for variable o unmet by value "" with type absent. +Exit status was 0; expected 1. mlr --from ./reg-test/input/xyz2 put -q map o = $*; dump o { @@ -592,7 +576,6 @@ mlr --from ./reg-test/input/xyz2 put -q map o = {"a":1, "b": {"x":8,"y":9}, "c": } mlr --from ./reg-test/input/xyz2 put -q @a = 1; map o = @a; dump o -mlr: map type assertion for variable o unmet by value 1 with type int. mlr --from ./reg-test/input/xyz2 put -q @b[1] = 2; map o = @b; dump o { @@ -651,7 +634,6 @@ mlr --from ./reg-test/input/xyz2 put -q @c[1][2] = 3; map o = @*; dump o } mlr --from ./reg-test/input/xyz2 put -q a = 1; map o = a; dump o -mlr: map type assertion for variable o unmet by value 1 with type int. mlr --from ./reg-test/input/xyz2 put -q b[1] = 2; map o = b; dump o { @@ -707,8 +689,6 @@ mlr --from ./reg-test/input/xyz2 put -q var o = {"a":1, "b": {"x":8,"y":9}, "c": mlr --from ./reg-test/input/xyz2 put -q var o = @o; dump o - - mlr --from ./reg-test/input/xyz2 put -q var o = $*; dump o { "x": 3, @@ -857,8 +837,6 @@ mlr --from ./reg-test/input/xyz2 put -q o = {"a":1, "b": {"x":8,"y":9}, "c":3}; mlr --from ./reg-test/input/xyz2 put -q o = @o; dump o - - mlr --from ./reg-test/input/xyz2 put -q o = $*; dump o { "x": 3,