diff --git a/rust/src/sans_io/read.rs b/rust/src/sans_io/read.rs index 20826c767..537fc4a29 100644 --- a/rust/src/sans_io/read.rs +++ b/rust/src/sans_io/read.rs @@ -1111,10 +1111,13 @@ mod tests { let mut reader = LinearReader::new_with_options( LinearReaderOptions::default().with_prevalidate_chunk_crcs(true), ); + let mut message_count = 0; while let Some(action) = reader.next_action() { match action.expect("failed to get next action") { ReadAction::GetRecord { data: _, opcode } => { - print!("{},", opcode); + if opcode == op::MESSAGE { + message_count += 1; + } } ReadAction::NeedMore(_) => { let read = f @@ -1124,5 +1127,6 @@ mod tests { } } } + assert_eq!(message_count, 199); } }