summaryrefslogtreecommitdiffstats
path: root/third_party/rust/flate2/tests/zero-write.rs
blob: 22be8eec223fe569a2585eee46c86df0ca12e24d (plain)
1
2
3
4
5
6
#[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());
}