()
| 404 | |
| 405 | #[test] |
| 406 | fn test_skip_section() { |
| 407 | let (buf, _hash) = write_minimal_change(); |
| 408 | let mut cursor = Cursor::new(&buf); |
| 409 | let mut reader = ChangeReader::open(&mut cursor).unwrap(); |
| 410 | |
| 411 | // Skip HEADER |
| 412 | assert!(reader.skip_section().unwrap()); |
| 413 | assert_eq!(reader.stats().sections_skipped, 1); |
| 414 | |
| 415 | // Read DEPS normally |
| 416 | let section = reader.next_section().unwrap().unwrap(); |
| 417 | assert_eq!(section.section_type, SectionType::Dependencies); |
| 418 | |
| 419 | // No more to skip |
| 420 | assert!(!reader.skip_section().unwrap()); |
| 421 | } |
| 422 | |
| 423 | #[test] |
| 424 | fn test_skip_all_sections() { |
nothing calls this directly
no test coverage detected