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

        f(__local396__) = __local396__

        p {
          data.test.omit_result.f(1)
        }
      - |
        package topdown_test_partial

        __result__ = _result {
          _result = 20
        }
      - |
        package ex

        foo(__local278__) = y {
          split(__local278__, "i", y)
        }

        bar[x] = y {
          data.l[_].a = x
          data.ex.foo(x, y)
        }

        chain0(__local279__) = y {
          data.ex.foo(__local279__, y)
        }

        chain1(__local280__) = b {
          data.ex.chain0(__local280__, b)
        }

        chain2 = d {
          data.ex.chain1("fooibar", d)
        }

        cross(__local281__) = [a, b] {
          split(__local281__, "i", y)
          __local27__ = y[1]
          data.ex.foo(__local27__, b)
          __local28__ = y[2]
          data.test.foo(__local28__, a)
        }

        falsy_func(__local282__) = false

        falsy_func_else(__local283__) {
          __local283__ = 1
        }

        else = false {
          true
        }

        falsy_undefined {
          data.ex.falsy_func(1)
        }

        falsy_negation {
          not data.ex.falsy_func(1)
        }

        falsy_else_value = __local23__ {
          true
          data.ex.falsy_func_else(2, __local23__)
        }

        falsy_else_undefined {
          data.ex.falsy_func_else(2)
        }

        falsy_else_negation {
          not data.ex.falsy_func_else(2)
        }

        arrays([__local285__, __local286__]) = [a, b] {
          data.ex.foo(__local285__, a)
          data.ex.foo(__local286__, b)
        }

        arraysrule = y {
          data.ex.arrays(["hih", "foo"], y)
        }

        objects({"foo": __local287__, "bar": __local288__}) = z {
          data.ex.foo(__local287__, a)
          data.test.foo(__local288__, b)
          z = [a, b]
        }

        objectsrule = y {
          data.ex.objects({"bar": "hi ho", "foo": "hih"}, y)
        }

        refoutput = y {
          data.ex.foo("hih", z)
          y = z[1]
        }

        void(__local289__) {
          __local289__ = "foo"
        }

        voidGood {
          not data.ex.void("bar", true)
        }

        voidBad {
          data.ex.void("bar", true)
        }

        multi(1, __local290__) = y {
          y = __local290__
        }

        multi(2, __local291__) = y {
          __local24__ = 2 * __local291__
          a = __local24__
          __local25__ = a + 1
          y = __local25__
        }

        multi(3, __local292__) = y {
          __local26__ = __local292__ * 10
          y = __local26__
        }

        multi("foo", __local293__) = y {
          y = "bar"
        }

        multi1 = y {
          data.ex.multi(1, 2, y)
        }

        multi2 = y {
          data.ex.multi(2, 2, y)
        }

        multi3 = y {
          data.ex.multi(3, 2, y)
        }

        multi4 = y {
          data.ex.multi("foo", 2, y)
        }

        always_true_fn(__local294__) = true

        always_true {
          data.ex.always_true_fn(1)
        }
      - |
        package test

        foo(__local344__) = y {
          trim(__local344__, "h o", y)
        }

        cross = y {
          data.ex.cross("hi, my name is foo", y)
        }

        multi("foo", __local345__) = y {
          y = __local345__
        }

        multi("bar", __local346__) = y {
          y = "baz"
        }

        multi_cross_pkg = [y, z] {
          data.test.multi("foo", "bar", y)
          data.ex.multi(2, 1, z)
        }
      - |
        package test

        samepkg = y {
          data.test.foo("how do you do?", y)
        }
      - |
        package test.l1.l3

        g(__local363__) = __local363__
      - |
        package test.l1.l2

        p = true

        f(__local380__) = __local380__
    note: functions/multi4
    query: data.ex.multi4 = x
    want_result:
      - x: bar
