---
cases:
  - note: strings/indexof_n_single_match
    query: data.test.p = x
    modules:
      - |
        package test

        p := indexof_n("dogcat", "cat")
    want_result:
      - x:
          - 3
  - note: strings/indexof_n_multiple_matches
    query: data.test.p = x
    modules:
      - |
        package test

        p := indexof_n("dogcatdogcat", "cat")
    want_result:
      - x:
          - 3
          - 9
  - note: strings/indexof_n_no_match
    query: data.test.p = x
    modules:
      - |
        package test

        p := indexof_n("dogcat", "rabbit")
    want_result:
      - x: []
  - note: strings/indexof_n_unicode_matches
    query: data.test.p = x
    modules:
      - "package test\n\np := indexof_n(\"\U0001F607\U0001F600\U0001F607\U0001F600\U0001F607\U0001F600\", \"\U0001F600\")\n"
    want_result:
      - x:
          - 1
          - 3
          - 5
  - note: strings/indexof_n_unicode_no_match
    query: data.test.p = x
    modules:
      - "package test\n\np := indexof_n(\"\U0001F607\U0001F600\U0001F607\U0001F600\U0001F607\U0001F600\", \"\U0001F602\")\n"
    want_result:
      - x: []
