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:
Pyfisch
2015-04-26 12:30:06 +02:00
parent 9d83ed66d8
commit efd6c96a3c
7 changed files with 96 additions and 26 deletions

View File

@@ -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)]