mirror of
https://github.com/apple/swift-http-structured-headers
synced 2026-11-24 04:37:50 +00:00
59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
[
|
|
{
|
|
"name": "basic list of lists",
|
|
"raw": ["(1 2), (42 43)"],
|
|
"header_type": "list",
|
|
"expected": [[[[1,{}], [2,{}]], {}], [[[42,{}], [43,{}]], {}]]
|
|
},
|
|
{
|
|
"name": "single item list of lists",
|
|
"raw": ["(42)"],
|
|
"header_type": "list",
|
|
"expected": [[[[42,{}]], {}]]
|
|
},
|
|
{
|
|
"name": "empty item list of lists",
|
|
"raw": ["()"],
|
|
"header_type": "list",
|
|
"expected": [[[], {}]]
|
|
},
|
|
{
|
|
"name": "empty middle item list of lists",
|
|
"raw": ["(1),(),(42)"],
|
|
"header_type": "list",
|
|
"expected": [[[[1,{}]], {}], [[], {}], [[[42,{}]], {}]],
|
|
"canonical": ["(1), (), (42)"]
|
|
},
|
|
{
|
|
"name": "extra whitespace list of lists",
|
|
"raw": ["( 1 42 )"],
|
|
"header_type": "list",
|
|
"expected": [[[[1,{}], [42,{}]], {}]],
|
|
"canonical": ["(1 42)"]
|
|
},
|
|
{
|
|
"name": "wrong whitespace list of lists",
|
|
"raw": ["(1\t 42)"],
|
|
"header_type": "list",
|
|
"must_fail": true
|
|
},
|
|
{
|
|
"name": "no trailing parenthesis list of lists",
|
|
"raw": ["(1 42"],
|
|
"header_type": "list",
|
|
"must_fail": true
|
|
},
|
|
{
|
|
"name": "no trailing parenthesis middle list of lists",
|
|
"raw": ["(1 2, (42 43)"],
|
|
"header_type": "list",
|
|
"must_fail": true
|
|
},
|
|
{
|
|
"name": "no spaces in inner-list",
|
|
"raw": ["(abc\"def\"?0123*dXZ3*xyz)"],
|
|
"header_type": "list",
|
|
"must_fail": true
|
|
}
|
|
]
|