- check:
    name: Check variables expansion is correct (PASS)
    key: $(test)_PASS
    values:
      - <| $(expanse_index) == 1 |>
      - <| $(expanse_table)[$(expanse_index)] == 9012 |>
      - <| $(expanse_eval) == True |>

- let:
    name: Dynamic variables expansion
    key: $(test)_PASS
    values:
      - expanse_select: <|"$(expanse_select)".replace("o", "a")|>
      - expanse_index: $(expanse_index_$(expanse_select))
      - expanse_table: $(expanse_table_$(expanse_select))
      - expanse_eval: <|$(expanse_index) == 1|>

- check:
    name: Check variables expansion is correct (PASS)
    key: $(test)_PASS
    values:
      - <| $(expanse_index) == 0 |>
      - <| $(expanse_table)[$(expanse_index)] == "abcd" |>
      - <| $(expanse_eval) == False |>

- let:
    name: Complex variables expansion
    key: $(test)_PASS
    values:
      - var1: expanse
      - var2: var
      - var3: bla
      - var4: blo
      - expanse_var_bla: 3
      - expanse_blo_var: 5
      - expanse_complex: <|<|$(expanse_$(var2)_$(var3))*6|> + <|4*$($(var1)_$(var4)_$(var2))|>|>

- check:
    name: Check complex variables expansion is correct (PASS)
    key: $(test)_PASS
    values:
      - <| $(expanse_complex) == 38 |>

- let:
    name: Variables expansion in object
    key: $(test)_PASS
    values:
      - expanse_key: b
      - expanse_var: 3
      - expanse_var_2: 6
      - expanse_object:
          [
            { a: $(expanse_var_2), $(expanse_key): <|2**3|> },
            {
              '<|"bla".replace("a", "o")|>':
                [<|$(expanse_var)*$(expanse_var_2)|>, 25],
            },
          ]

- check:
    name: Check complex variables expansion is correct (PASS)
    key: $(test)_PASS
    values:
      - '<| $(expanse_object) == [{"a": 6, "b": 8}, {"blo": [18, 25]}] |>'
