Skip to content

Commit 4b09f61

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

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/capture/activated/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,10 @@ 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(|_| panic!());
155+
}

0 commit comments

Comments
 (0)