{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "split-comma",
      "spotlight": true,
      "description": "Splitting on a comma yields a list rendered as a JSON-ish array of quoted strings.",
      "template": "{{ csv | split: \",\" }}",
      "context": {
        "csv": "a,b,c"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[\"a\",\"b\",\"c\"]"
      }
    },
    {
      "name": "split-delimiter-absent",
      "description": "If the delimiter is not in the input, the result is a single-element list.",
      "template": "{{ phrase | split: \",\" }}",
      "context": {
        "phrase": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[\"hello\"]"
      }
    },
    {
      "name": "split-empty-delimiter",
      "description": "Empty delimiter produces a list of single-character primitives.",
      "template": "{{ phrase | split: \"\" }}",
      "context": {
        "phrase": "abc"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[\"a\",\"b\",\"c\"]"
      }
    },
    {
      "name": "split-empty-input",
      "description": "Empty input split by any non-empty delimiter produces a list with one empty-string element.",
      "template": "{{ phrase | split: \",\" }}",
      "context": {
        "phrase": ""
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[\"\"]"
      }
    },
    {
      "name": "split-empty-input-empty-delim",
      "description": "Empty input split by empty delimiter produces an empty list.",
      "template": "{{ phrase | split: \"\" }}",
      "context": {
        "phrase": ""
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[]"
      }
    },
    {
      "name": "split-piped-into-contains",
      "description": "Result list composes with contains: the array branch handles list inputs.",
      "template": "{{ csv | split: \",\" | contains: \"b\" }}",
      "context": {
        "csv": "a,b,c"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "true"
      }
    },
    {
      "name": "split-piped-into-each",
      "spotlight": true,
      "description": "Result list composes with each-block iteration.",
      "template": "{{#each csv | split: \",\" }}{{ this }};{{/each}}",
      "context": {
        "csv": "x,y,z"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "x;y;z;"
      }
    },
    {
      "name": "split-zero-args-is-error",
      "description": "Zero arguments is an arity error.",
      "template": "{{ csv | split }}",
      "context": {
        "csv": "a,b"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "split-two-args-is-error",
      "description": "Two arguments is an arity error.",
      "template": "{{ csv | split: \",\" \",\" }}",
      "context": {
        "csv": "a,b"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "split-empty-delimiter-astral",
      "description": "Empty-delimiter split explodes by code point, so a surrogate pair stays one element rather than splitting into two.",
      "template": "{{ s | split: \"\" }}",
      "context": {
        "s": "a😀b"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[\"a\",\"😀\",\"b\"]"
      }
    }
  ]
}
