()
| 214 | |
| 215 | #[test] |
| 216 | fn test_read_gzip() { |
| 217 | |
| 218 | assert_eq!( |
| 219 | String::from_utf8( |
| 220 | GzipData::from_file("datasets/testing/hello_world.gz").unwrap().into_bytes()).unwrap(), |
| 221 | "hello world".to_string() |
| 222 | ); |
| 223 | |
| 224 | assert_eq!(GzipData::from_file("datasets/testing/hello_world.gz").unwrap().len(), 11); |
| 225 | assert!(GzipData::from_file("datasets/testing/random.data").is_err()); |
| 226 | |
| 227 | let mut data = GzipData::from_file("datasets/testing/hello_world.gz").unwrap(); |
| 228 | let mut v: Vec<u8> = Vec::new(); |
| 229 | assert!(data.read_to_end(&mut v).is_ok()); |
| 230 | assert_eq!(String::from_utf8(v).unwrap(), "hello world".to_string()); |
| 231 | } |
| 232 | |
| 233 | #[test] |
| 234 | fn test_match_lines() { |
nothing calls this directly
no test coverage detected