Skip to content

Commit 9b502f0

Browse files
committed
Add a test that covers panic in pcap_loop
1 parent 2207e18 commit 9b502f0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/capture/activated/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,12 @@ fn read_packet_via_pcap_loop() {
146146
});
147147
assert_eq!(packets, 1);
148148
}
149+
150+
#[test]
151+
#[should_panic]
152+
fn panic_in_pcap_loop() {
153+
let mut capture = capture_from_test_file("packet_snaplen_65535.pcap");
154+
capture.for_each(|_| {
155+
panic!()
156+
});
157+
}

0 commit comments

Comments
 (0)