{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "remove_last-basic",
      "spotlight": true,
      "description": "Removes only the last occurrence; earlier matches are untouched.",
      "template": "{{ phrase | remove_last: \"o\" }}",
      "context": {
        "phrase": "foo boo"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "foo bo"
      }
    },
    {
      "name": "remove_last-target-absent",
      "description": "If the substring is absent, output equals input.",
      "template": "{{ phrase | remove_last: \"xyz\" }}",
      "context": {
        "phrase": "hello world"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "hello world"
      }
    },
    {
      "name": "remove_last-empty-arg",
      "description": "Removing an empty string leaves the input unchanged.",
      "template": "{{ phrase | remove_last: \"\" }}",
      "context": {
        "phrase": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "hello"
      }
    },
    {
      "name": "remove_last-zero-args-is-error",
      "description": "Zero arguments is an arity error.",
      "template": "{{ phrase | remove_last }}",
      "context": {
        "phrase": "hello"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "remove_last-two-args-is-error",
      "description": "Two arguments is an arity error.",
      "template": "{{ phrase | remove_last: \"a\" \"b\" }}",
      "context": {
        "phrase": "hello"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "remove_last-chained-after-upcase",
      "spotlight": true,
      "description": "Composes correctly when input arrives from a prior transform.",
      "template": "{{ phrase | upcase | remove_last: \"L\" }}",
      "context": {
        "phrase": "hello"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "HELO"
      }
    }
  ]
}
