test(headers): Allow tests inside list header macros, add tests.
Adds test cases from the relevant RFCs for a few headers. See also: #468, do we want the test cases rendered as examples in the docs?
This commit is contained in:
@@ -14,6 +14,16 @@ header! {
|
||||
#[doc="Transfer-Encoding = 1#transfer-coding"]
|
||||
#[doc="```"]
|
||||
(TransferEncoding, "Transfer-Encoding") => (Encoding)+
|
||||
|
||||
transfer_encoding {
|
||||
test_header!(
|
||||
test1,
|
||||
vec![b"gzip, chunked"],
|
||||
Some(HeaderField(
|
||||
vec![Encoding::Gzip, Encoding::Chunked]
|
||||
)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] });
|
||||
|
||||
Reference in New Issue
Block a user