test(headers): Add tests for possibly empty list headers.

This commit is contained in:
Pyfisch
2015-04-26 14:32:10 +02:00
parent 18f717fcf1
commit 76a4a01348
7 changed files with 53 additions and 19 deletions

View File

@@ -16,6 +16,14 @@ header! {
#[doc="codings = content-coding / \"identity\" / \"*\""]
#[doc="```"]
(AcceptEncoding, "Accept-Encoding") => (QualityItem<Encoding>)*
test_accept_encoding {
test_header!(test1, vec![b"compress, gzip".to_vec()]);
test_header!(test2, vec![b"".to_vec()]);
test_header!(test3, vec![b"*".to_vec()]);
test_header!(test4, vec![b"compress;q=0.5, gzip;q=1.0".to_vec()]);
test_header!(test5, vec![b"gzip;q=1.0, identity; q=0.5, *;q=0".to_vec()]);
}
}
#[cfg(test)]