{
  "schema": "https://bars.commonsware.com/conformance/schema/render-fixture.schema.json",
  "version": "0.1.0",
  "cases": [
    {
      "name": "url_encode-basic",
      "spotlight": true,
      "description": "Spaces become +; reserved chars are percent-encoded.",
      "template": "{{{ q | url_encode }}}",
      "context": {
        "q": "hello world!"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "hello+world%21"
      }
    },
    {
      "name": "url_encode-unreserved-literal",
      "description": "Characters in the unreserved set [A-Za-z0-9-_.~] pass through literally.",
      "template": "{{{ q | url_encode }}}",
      "context": {
        "q": "abc-_.~123"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "abc-_.~123"
      }
    },
    {
      "name": "url_encode-utf8-multibyte",
      "spotlight": true,
      "description": "Non-ASCII characters are percent-encoded byte-by-byte as UTF-8 (uppercase hex).",
      "template": "{{{ q | url_encode }}}",
      "context": {
        "q": "caf\u00e9"
      },
      "expect": {
        "kind": "output",
        "expectedOutput": "caf%C3%A9"
      }
    },
    {
      "name": "url_encode-empty",
      "description": "Empty input encodes to empty output.",
      "template": "{{{ q | url_encode }}}",
      "context": {
        "q": ""
      },
      "expect": {
        "kind": "output",
        "expectedOutput": ""
      }
    },
    {
      "name": "url_encode-with-arg-is-error",
      "description": "Any argument is an arity error.",
      "template": "{{ q | url_encode: \"x\" }}",
      "context": {
        "q": "hi"
      },
      "expect": {
        "kind": "error",
        "errorCode": "KB-2002"
      }
    }
  ]
}
