test(upserver): 归档存档迁移与玩法闭环回归工具
This commit is contained in:
8
CodexOutput/upserver/SoundExitTests/generate.py
Normal file
8
CodexOutput/upserver/SoundExitTests/generate.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from pathlib import Path
|
||||
s=Path('Client/Assets/Scripts/Sound/SoundService.cs').read_text(encoding='utf-8-sig')
|
||||
start=s.index('public void Release()', s.index('class SoundService')); a=s.index('{',start); n=1; end=a+1
|
||||
while n:
|
||||
n+=(s[end]=='{')-(s[end]=='}'); end+=1
|
||||
field='private int initializationVersion;'
|
||||
assert field in s
|
||||
Path('CodexOutput/upserver/SoundExitTests/Generated.cs').write_text('public partial class Subject {\n'+field+'\n'+s[start:end]+'\n}',encoding='utf-8')
|
||||
Reference in New Issue
Block a user