---
cases:
  - note: reachable/cycle
    query: data.generated.p = x
    modules:
      - |
        package generated

        p := __local0__ if {
        	graph.reachable({
        		"a": {"b"},
        		"b": {"c"},
        		"c": {"a"},
        	}, {"a"}, __local1__)
        	sort(__local1__, __local2__)
        	__local0__ = __local2__
        }
    data: {}
    input_term: "{}"
    want_result:
      - x:
          - a
          - b
          - c
