---
cases:
  - data: {}
    modules:
      - |
        package test.a

        d = 3
      - |
        package test

        e = 4
      - |
        package generated

        r = __local0__ {
          true
          __local0__ = data.test
        }

        n1 {
          data.test.a.z = 7
        }

        n {
          not data.generated.n1
        }

        q = x {
          not data.generated.n with data.test.a.z as 7
          data.generated.r = x with data.test.a.c as 2
        }

        p = x {
          data.generated.q = x with data.test.a.b as 1
        }
    note: withkeyword/with not stack (data)
    query: data.generated.p = x
    want_result:
      - x:
          a:
            b: 1
            c: 2
            d: 3
          e: 4
