mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Tests: add corrupt .blend reader files
Add blend files with corrupt SDNA, the files are referenced from bl_blendfile_versioning `invalid_files` collection. Ref !161341
This commit is contained in:
parent
3271b39619
commit
b0e13d1422
7 changed files with 80 additions and 0 deletions
|
|
@ -298,6 +298,37 @@ class TestBlendFileOpenLinkSaveAllTestFiles(TestHelper):
|
|||
(OSError, RuntimeError),
|
||||
"created by a Big Endian version of Blender, support for these files has been removed in Blender 5.0"
|
||||
),
|
||||
|
||||
# invalid_blendfiles/invalid_sdna_struct_size.blend
|
||||
# A struct's DNA size no longer matches the sum of its members.
|
||||
"invalid_sdna_struct_size.blend": (
|
||||
(OSError, RuntimeError),
|
||||
"Invalid struct size in SDNA file"
|
||||
),
|
||||
# invalid_blendfiles/invalid_block_count.blend
|
||||
# A file-block declares an out-of-range array element count.
|
||||
"invalid_block_count.blend": (
|
||||
(OSError, RuntimeError),
|
||||
"Corrupt .blend file, invalid block count"
|
||||
),
|
||||
# invalid_blendfiles/invalid_block_struct_index.blend
|
||||
# A file-block references an out-of-range SDNA struct index.
|
||||
"invalid_block_struct_index.blend": (
|
||||
(OSError, RuntimeError),
|
||||
"Corrupt .blend file, invalid block struct index"
|
||||
),
|
||||
# invalid_blendfiles/invalid_global_block.blend
|
||||
# The required global block references an out-of-range SDNA struct index.
|
||||
"invalid_global_block.blend": (
|
||||
(OSError, RuntimeError),
|
||||
"is corrupt, unable to read"
|
||||
),
|
||||
# invalid_blendfiles/invalid_window_workspace_hook.blend
|
||||
# A window's sub-block references an out-of-range SDNA struct index.
|
||||
"invalid_window_workspace_hook.blend": (
|
||||
(OSError, RuntimeError),
|
||||
"Corrupt .blend file, invalid block struct index"
|
||||
),
|
||||
}
|
||||
|
||||
assert all(p.endswith("/") for p in self.excluded_open_link_dirs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue