|
87 | 87 |
|
88 | 88 | "Merge arrays", |
89 | 89 | [{"merge":[]}, null, []], |
90 | | -[{"merge":[["a"]]}, null, ["a"]], |
91 | | -[{"merge":[["a"], ["b"]]}, null, ["a","b"]], |
92 | | -[{"merge":[["a"], ["b"], ["c"]]}, null, ["a","b","c"]], |
93 | | -[{"merge":[["a", "b"], ["c"]]}, null, ["a","b","c"]], |
94 | | -[{"merge":[["a"], ["b", "c"]]}, null, ["a","b","c"]], |
| 90 | +[{"merge":[[1]]}, null, [1]], |
| 91 | +[{"merge":[[1],[]]}, null, [1]], |
| 92 | +[{"merge":[[1], [2]]}, null, [1,2]], |
| 93 | +[{"merge":[[1], [2], [3]]}, null, [1,2,3]], |
| 94 | +[{"merge":[[1, 2], [3]]}, null, [1,2,3]], |
| 95 | +[{"merge":[[1], [2, 3]]}, null, [1,2,3]], |
| 96 | +"Given non-array arguments, merge converts them to arrays", |
| 97 | +[{"merge":1}, null, [1]], |
| 98 | +[{"merge":[1,2]}, null, [1,2]], |
| 99 | +[{"merge":[1,[2]]}, null, [1,2]], |
| 100 | + |
| 101 | +"Missing and Merge, and If are friends. VIN is always required, APR is only required if financing is true.", |
| 102 | +[ |
| 103 | +{"missing":{"merge":[ |
| 104 | + "vin", |
| 105 | + {"if": [{"var":"financing"}, ["apr"], [] ]} |
| 106 | +]} }, |
| 107 | +{"financing":true}, |
| 108 | +["vin","apr"] |
| 109 | +], |
| 110 | + |
| 111 | +[ |
| 112 | +{"missing":{"merge":[ |
| 113 | + "vin", |
| 114 | + {"if": [{"var":"financing"}, ["apr"], [] ]} |
| 115 | +]} }, |
| 116 | +{"financing":false}, |
| 117 | +["vin"] |
| 118 | +], |
95 | 119 |
|
96 | 120 | "END" |
97 | 121 | ] |
0 commit comments