883 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
26 lines
2.1 KiB
Lua
26 lines
2.1 KiB
Lua
-- Public data-only diagnostics. Fakes are not real reputation verification.
|
|
local realprint=print;print=function()end
|
|
CreateFrame=function()return {RegisterEvent=function()end,SetScript=function()end}end
|
|
SlashCmdList={};GatewayDiagnosticsSaved={unrelated=true};local hidden={};local calls=0
|
|
issecretvalue=function(v)return v==hidden end
|
|
C_Reputation={GetNumFactions=function()return 54 end,GetFactionDataByID=function(id)
|
|
calls=calls+1;return {factionID=id,name='fixture',currentStanding=42000,reaction=8,atWarWith=false,description='DO_NOT_EXPORT'}end}
|
|
dofile(arg[1]..'/client_addons/GatewayDiagnostics/GatewayDiagnostics.lua')
|
|
local slash=SlashCmdList.GATEWAYDIAGNOSTICS
|
|
slash('reputation-test deadbeef 1007,1001');slash('reputation-test deadbeef 72')
|
|
local r=GatewayDiagnosticsSaved.nativeFactionAcceptance
|
|
assert(r.run=='deadbeef'and r.visibleCount==54 and r.factions[1007].currentStanding==42000 and r.factions[72].status=='ok')
|
|
assert(r.factions[1007].description==nil and r.factions[1007].atWarWith==false and GatewayDiagnosticsSaved.unrelated)
|
|
local before=calls
|
|
for _,bad in ipairs({'reputation-test deadbeef 0','reputation-test deadbeef 01','reputation-test deadbeef 1,','reputation-test deadbeef 1,1','reputation-test deadbee 1','reputation-test deadbeef 2147483648','reputation-test deadbeef 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17'})do slash(bad);assert(calls==before)end
|
|
C_Reputation.GetFactionDataByID=function()return hidden end
|
|
slash('reputation-test deadbeef 1007');assert(r.factions[1007].status=='not-public')
|
|
C_Reputation.GetFactionDataByID=function()error('DO_NOT_EXPORT')end
|
|
slash('reputation-test deadbeef 1007');assert(r.factions[1007].status=='failed')
|
|
local full={};for i=1,256 do full[i]={status='fixture'}end
|
|
GatewayDiagnosticsSaved.nativeFactionAcceptance={run='cafefeed',factions=full}
|
|
before=calls;slash('reputation-test cafefeed 1007');assert(calls==before and full[1007]==nil)
|
|
GatewayDiagnosticsSaved.nativeFactionAcceptance={run='cafefeed',factions=false}
|
|
slash('reputation-test cafefeed 1007');assert(calls==before)
|
|
print=realprint;print('Bounded reputation IDs, repeated chunks, original-value capture and secret/error redaction passed.')
|