Files
amibis/Amibis/Tests/run.lua
T
dfj 912ed8f255 Fix /amibis spec clear being stored as a spec override
The generic "spec <name>" branch matched before the "spec clear" check,
so clearing an override set overrideSpec to "Clear" and the UI then
looked for a spec called Clear instead of falling back to auto-detection.

Check the clear command first, collapse whitespace so "spec   clear"
parses, and refresh the frame immediately when the override changes.
Spec names are also title-cased per word now, so "/amibis spec beast
mastery" resolves to "Beast Mastery".

Add test_slash.lua covering set/clear, case/whitespace normalization,
and the clear-as-spec-name regression. 93 tests passing.
2026-10-24 00:45:28 +02:00

29 lines
967 B
Lua

-- Offline test-suite entry point for Amibis.
--
-- Usage, from the repository root:
-- lua5.4 Amibis/Tests/run.lua
--
-- Requires only a Lua 5.3+ interpreter. No external libraries, no WoW client.
-- WoW API calls are mocked by wow_mocks.lua; SavedVariables globals are
-- stubbed below (in-game they are created by InitializeDB on ADDON_LOADED).
local ADDON_NAME = "Amibis"
local ns = {}
dofile("Amibis/Tests/harness.lua")
dofile("Amibis/Tests/wow_mocks.lua")
_G.AmibisDB = { selectedPhase = "T6" }
_G.AmibisCharDB = {}
assert(loadfile("Amibis/Amibis.lua"))(ADDON_NAME, ns)
assert(loadfile("Amibis/Data/BISLists.lua"))(ADDON_NAME, ns)
assert(loadfile("Amibis/Tests/test_data.lua"))(ADDON_NAME, ns)
assert(loadfile("Amibis/Tests/test_stats.lua"))(ADDON_NAME, ns)
assert(loadfile("Amibis/Tests/test_compare.lua"))(ADDON_NAME, ns)
assert(loadfile("Amibis/Tests/test_slash.lua"))(ADDON_NAME, ns)
local success = TestHarness_report()
os.exit(success and 0 or 1)