Files
gen1recomp/tests/game3_flags_extract_preserve_test.lua
Shane McGovern 4010857a32 feat(game3): add FireRed help system and quest log
Add ROM-backed contextual L/R help with article navigation and safe pause/resume. Record recent field scenes and gameplay events for the skippable Continue recap, with playback isolated from live progress.

Integrate extraction and cache validation, preserve bundled script flags during import, and cover navigation, persistence, event recording, playback isolation, and both ROM revisions with tests.
2026-09-16 22:28:13 +01:00

15 lines
729 B
Lua

package.path='./?.lua;./?/init.lua;'..package.path
local Extract=require('src.import.gba.flags_extract')
local function source()
local f=assert(io.open('src/core/game3/scripting/flags_table.lua','rb'))
local s=f:read('*a');f:close();return s
end
local before=source()
local empty=Extract.extract({root='/nonexistent-pokefirered-source'})
local cache={write=function(self,_,s) self.source=s;return true end}
assert(Extract.write(cache,'test',empty))
assert(source()==before,'Import must never overwrite engine source')
local flags=assert(loadstring(cache.source))()
assert(flags.FLAGS.FLAG_SYS_POKEDEX_GET==0x829,'Missing headers must use bundled constants')
print('Flag extraction preserves source and uses bundled constants')