---
cases:
  - note: reachable_paths/cycle_1022_1
    query: data.reachable.p = x
    modules:
      - |
        package reachable

        p := result if {
        	graph.reachable_paths(input.graph, input.initial, result)
        }
    data: {}
    input_term: '{ "graph": { "one": ["two","five"], "two": ["four"], "three": [""], "four": ["three"], "five": ["seven","six"], "six": ["nine"], "seven": ["eight"], "eight": [""], "nine": [""], }, "initial": {"one"} }'
    want_result:
      - x:
          - - one
            - five
            - seven
            - eight
          - - one
            - five
            - six
            - nine
          - - one
            - two
            - four
            - three
  - note: reachable_paths/cycle_1022_2
    query: data.reachable.p = x
    modules:
      - |
        package reachable

        p := result if {
        	graph.reachable_paths(input.graph, input.initial, result)
        }
    data: {}
    input_term: '{ "graph": { "one": {"two","five"}, "two": {"four"}, "three": {""}, "four": {"three"}, "five": {"seven","six"}, "six": {"nine"}, "seven": {"eight"}, "eight": {""}, "nine": {""}, }, "initial": {"one"} }'
    want_result:
      - x:
          - - one
            - five
            - seven
            - eight
          - - one
            - five
            - six
            - nine
          - - one
            - two
            - four
            - three
  - note: reachable_paths/cycle_1022_3
    query: data.reachable.p = x
    modules:
      - |
        package reachable

        p := result if {
        	graph.reachable_paths(input.graph, input.initial, result)
        }
    data: {}
    input_term: '{ "graph": { "one": ["two","five"], "two": ["four"], "three": [""], "four": ["three"], "five": ["seven","six"], "six": ["nine","seven"], "seven": ["eight"], "eight": ["three"], "nine": [""], }, "initial": {"one"} }'
    want_result:
      - x:
          - - one
            - five
            - seven
            - eight
            - three
          - - one
            - five
            - six
            - nine
          - - one
            - five
            - six
            - seven
            - eight
            - three
          - - one
            - two
            - four
            - three
