---
cases:
  - data: {}
    modules:
      - |
        package generated

        p = x {
          substring("aaa", 3, -1, x)
        }
    note: "strings/substring: offset too long"
    query: data.generated.p = x
    want_result:
      - x: ""
  - modules:
      - "package generated\n\np = x {\n  substring(\"\xE5\xE4\xF6\", 3, -1, x)\n}\n"
    note: "strings/substring: offset too long unicode"
    query: data.generated.p = x
    want_result:
      - x: ""
