Skip to content

Commit

Permalink
Renamed corrupt test gzip file (rust-lang#277)
Browse files Browse the repository at this point in the history
* Renamed corrupt gzip file in tests so it doesn't trip up virus scanners.

* Fixed broken example.
  • Loading branch information
billallen256 authored Jul 12, 2021
1 parent 19708cf commit 33f9f3d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/gzencoder-read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ fn gzencoder_read_hello_world() -> io::Result<Vec<u8>> {
let mut result = Vec::new();
let c = b"hello world";
let mut z = GzEncoder::new(&c[..], Compression::fast());
z.read_to_end(&mut ret_vec)?;
z.read_to_end(&mut result)?;
Ok(result)
}
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/gunzip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn test_extract_success_partial_multi() {
// test extraction fails on a corrupt file
#[test]
fn test_extract_failure() {
let result = extract_file(Path::new("tests/corrupt-file.gz"));
let result = extract_file(Path::new("tests/corrupt-gz-file.bin"));
assert_eq!(result.err().unwrap().kind(), io::ErrorKind::InvalidInput);
}

Expand Down

0 comments on commit 33f9f3d

Please sign in to comment.