Add a real test suite for the save system (previously had none)
Covers save.c (device discovery/orchestration), savedevice.c (the generic device state machine and platform dispatch), and the Linux platform backend (path building, availability checks, JSON read/write, corrupt/missing-file handling), plus saveslot.c/savesettings.c JSON round-trips. 88 tests across 5 files, all run against the real Linux filesystem backend sandboxed to a temp $HOME (there's no mockable platform layer - the hooks are compile-time macros, not function pointers). Deliberately locks in two existing behaviors rather than working around them: saveSaveSettings() is a permanent no-op because nothing anywhere ever sets SAVE.settingsDirty = true, and saveUpdate() unconditionally rewrites settings back out the moment a device is found regardless of that same dirty flag. Both are pre-existing, not introduced here. Does not cover the SAVE_DEVICE_DATA_RAW blob codec (PSP/GameCube/Wii only) or GameCube's 2-device fallback chain - neither compiles into the Linux host test build. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,5 +12,6 @@ add_subdirectory(thread)
|
||||
add_subdirectory(display)
|
||||
add_subdirectory(rpg)
|
||||
add_subdirectory(item)
|
||||
add_subdirectory(save)
|
||||
add_subdirectory(time)
|
||||
add_subdirectory(util)
|
||||
Reference in New Issue
Block a user