accept-case ./reg-test/cases/case-c-dsl-local-map-variable-write-read.sh

This commit is contained in:
John Kerl 2021-03-02 00:40:27 -05:00
parent d9e815d8c1
commit 9e11d2afa4
3 changed files with 117 additions and 60 deletions

View file

@ -1,16 +1,16 @@
run_mlr --from $indir/xyz345 put '
run_mlr --from $indir/xyz345 --ojson put '
$s = a;
$t = b[$x];
$u = c[$x][$y];
$v = d[$x][$y][$z];
'
run_mlr --from $indir/xyz345 put '
run_mlr --from $indir/xyz345 --ojson put '
d[$x][$y][$z] = 9;
$d = d[$x][$y][$z];
'
run_mlr --from $indir/xyz345 put '
run_mlr --from $indir/xyz345 --ojson put '
a = 6;
b[$x] = 7;
c[$x][$y] = 8;
@ -22,7 +22,7 @@ run_mlr --from $indir/xyz345 put '
$d = d[$x][$y][$z];
'
run_mlr --from $indir/xyz345 put '
run_mlr --from $indir/xyz345 --ojson put '
a = 6;
b[$x] = 7;
c[$x][$y] = 8;

View file

@ -1,56 +0,0 @@
mlr --from ./reg-test/input/xyz345 put
$s = a;
$t = b[$x];
$u = c[$x][$y];
$v = d[$x][$y][$z];
x=3,y=4,z=5
mlr --from ./reg-test/input/xyz345 put
d[$x][$y][$z] = 9;
$d = d[$x][$y][$z];
x=3,y=4,z=5,d=9
mlr --from ./reg-test/input/xyz345 put
a = 6;
b[$x] = 7;
c[$x][$y] = 8;
d[$x][$y][$z] = 9;
$a = a;
$b = b[$x];
$c = c[$x][$y];
$d = d[$x][$y][$z];
x=3,y=4,z=5,a=6,b=7,c=8,d=9
mlr --from ./reg-test/input/xyz345 put
a = 6;
b[$x] = 7;
c[$x][$y] = 8;
d[$x][$y][$z] = 9;
$a0 = a;
$a1 = a[$x];
$a2 = a[$x][$y];
$a3 = a[$x][$y][$z];
$b0 = b;
$b1 = b[$x];
$b2 = b[$x][$y];
$b3 = b[$x][$y][$z];
$c0 = c;
$c1 = c[$x];
$c2 = c[$x][$y];
$c3 = c[$x][$y][$z];
$d0 = d;
$d1 = d[$x];
$d2 = d[$x][$y];
$d3 = d[$x][$y][$z];
x=3,y=4,z=5,a0=6,b1=7,c2=8,d3=9

View file

@ -0,0 +1,113 @@
mlr --from ./reg-test/input/xyz345 --ojson put
$s = a;
$t = b[$x];
$u = c[$x][$y];
$v = d[$x][$y][$z];
{
"x": 3,
"y": 4,
"z": 5
}
mlr --from ./reg-test/input/xyz345 --ojson put
d[$x][$y][$z] = 9;
$d = d[$x][$y][$z];
{
"x": 3,
"y": 4,
"z": 5,
"d": 9
}
mlr --from ./reg-test/input/xyz345 --ojson put
a = 6;
b[$x] = 7;
c[$x][$y] = 8;
d[$x][$y][$z] = 9;
$a = a;
$b = b[$x];
$c = c[$x][$y];
$d = d[$x][$y][$z];
{
"x": 3,
"y": 4,
"z": 5,
"a": 6,
"b": 7,
"c": 8,
"d": 9
}
mlr --from ./reg-test/input/xyz345 --ojson put
a = 6;
b[$x] = 7;
c[$x][$y] = 8;
d[$x][$y][$z] = 9;
$a0 = a;
$a1 = a[$x];
$a2 = a[$x][$y];
$a3 = a[$x][$y][$z];
$b0 = b;
$b1 = b[$x];
$b2 = b[$x][$y];
$b3 = b[$x][$y][$z];
$c0 = c;
$c1 = c[$x];
$c2 = c[$x][$y];
$c3 = c[$x][$y][$z];
$d0 = d;
$d1 = d[$x];
$d2 = d[$x][$y];
$d3 = d[$x][$y][$z];
{
"x": 3,
"y": 4,
"z": 5,
"a0": 6,
"a1": (error),
"a2": (error),
"a3": (error),
"b0": {
"3": 7
},
"b1": 7,
"b2": (error),
"b3": (error),
"c0": {
"3": {
"4": 8
}
},
"c1": {
"4": 8
},
"c2": 8,
"c3": (error),
"d0": {
"3": {
"4": {
"5": 9
}
}
},
"d1": {
"4": {
"5": 9
}
},
"d2": {
"5": 9
},
"d3": 9
}