diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/gif/tests/crashtest.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/gif/tests/crashtest.rs')
-rw-r--r-- | vendor/gif/tests/crashtest.rs | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/vendor/gif/tests/crashtest.rs b/vendor/gif/tests/crashtest.rs deleted file mode 100644 index ef67cb3..0000000 --- a/vendor/gif/tests/crashtest.rs +++ /dev/null @@ -1,28 +0,0 @@ -use std::{fs, io}; -use gif::DecodeOptions; - -#[test] -fn try_decode_crash_regression() { - let files = fs::read_dir(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/crashtest")).unwrap(); - let options = DecodeOptions::new(); - - for entry in files { - let entry = entry.unwrap(); - if let Some(ext) = entry.path().extension() { - if ext.to_str() != Some("gif") { - panic!("Unexpected file {} in crashtests, should end with .gif", entry.path().display()); - } - } else { - panic!("Unexpected file {} in crashtests, should end with .gif", entry.path().display()); - } - - let file_data = fs::read(entry.path()).unwrap(); - let _ = try_decode_file(&options, file_data); - } -} - -fn try_decode_file(options: &DecodeOptions, data: Vec<u8>) -> Result<(), gif::DecodingError> { - let mut reader = options.clone().read_info(io::Cursor::new(data))?; - while reader.read_next_frame()?.is_some() {} - Ok(()) -} |