---
cases:
  - modules:
      - |
        package decode_object

        p = x {
          x = urlquery.decode_object("a=value_a1&b=value_b&a=value_a2")
        }
    note: urlbuiltins/decode_object multiple
    query: data.decode_object.p = x
    want_result:
      - x: { "a": ["value_a1", "value_a2"], "b": ["value_b"] }
  - modules:
      - |
        package decode_object

        p = x {
          x = urlquery.decode_object("a=value_a1&b")
        }
    note: urlbuiltins/decode_object empty parameter
    query: data.decode_object.p = x
    want_result:
      - x: { "a": ["value_a1"], "b": [""] }
  - modules:
      - |
        package decode_object

        p = x {
          x = urlquery.decode_object("")
        }
    note: urlbuiltins/decode_object empty string
    query: data.decode_object.p = x
    want_result:
      - x: {}
