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:
		| @@ -49,6 +49,10 @@ header! { | ||||
|     #[doc="language-range  = <language-range, see [RFC4647], Section 2.1>"] | ||||
|     #[doc="```"] | ||||
|     (AcceptLanguage, "Accept-Language") => (QualityItem<Language>)+ | ||||
|  | ||||
|     test_accept_language { | ||||
|         test_header!(test1, vec![b"da, en-gb;q=0.8, en;q=0.7"]); | ||||
|     } | ||||
| } | ||||
|  | ||||
| #[cfg(test)] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user