test(headers): Add tests for single value headers.
This commit is contained in:
		| @@ -21,17 +21,3 @@ header! { | ||||
|         test_header!(test1, vec![b"iso-8859-5, unicode-1-1;q=0.8"]); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| #[test] | ||||
| fn test_parse_header() { | ||||
|     use header::{self, q}; | ||||
|     let a: AcceptCharset = header::Header::parse_header( | ||||
|         [b"iso-8859-5, iso-8859-6;q=0.8".to_vec()].as_ref()).unwrap(); | ||||
|     let b = AcceptCharset(vec![ | ||||
|         QualityItem { item: Charset::Iso_8859_5, quality: q(1.0) }, | ||||
|         QualityItem { item: Charset::Iso_8859_6, quality: q(0.8) }, | ||||
|     ]); | ||||
|     assert_eq!(format!("{}", a), format!("{}", b)); | ||||
|     assert_eq!(a, b); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user