{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "rstrip-trailing-spaces",
      "spotlight": true,
      "description": "Trailing ASCII whitespace is removed; leading whitespace is preserved.",
      "template": "[{{ phrase | rstrip }}]",
      "context": {
        "phrase": "  hello   "
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[  hello]"
      }
    },
    {
      "name": "rstrip-only-whitespace",
      "description": "An all-whitespace string becomes empty.",
      "template": "[{{ phrase | rstrip }}]",
      "context": {
        "phrase": "    "
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[]"
      }
    },
    {
      "name": "rstrip-newlines-and-tabs",
      "description": "Trailing tabs and newlines are removed.",
      "template": "[{{ phrase | rstrip }}]",
      "context": {
        "phrase": "hello\n\t "
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[hello]"
      }
    },
    {
      "name": "rstrip-empty-string",
      "description": "Empty input stays empty.",
      "template": "[{{ phrase | rstrip }}]",
      "context": {
        "phrase": ""
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[]"
      }
    },
    {
      "name": "rstrip-with-arg-is-error",
      "description": "Any argument is an arity error.",
      "template": "{{ phrase | rstrip: \"x\" }}",
      "context": {
        "phrase": "hi"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    },
    {
      "name": "rstrip-chained-after-upcase",
      "spotlight": true,
      "description": "Composes with another transform.",
      "template": "[{{ phrase | upcase | rstrip }}]",
      "context": {
        "phrase": "hello    "
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "[HELLO]"
      }
    }
  ]
}
