File: zero-write.rs

package info (click to toggle)
rust-flate2 1.0.13-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 548 kB
  • sloc: makefile: 2
file content (8 lines) | stat: -rw-r--r-- 222 bytes parent folder | download | duplicates (34)
1
2
3
4
5
6
7
8
extern crate flate2;

#[test]
fn zero_write_is_error() {
    let mut buf = [0u8];
    let writer = flate2::write::DeflateEncoder::new(&mut buf[..], flate2::Compression::default());
    assert!(writer.finish().is_err());
}