add unit tests

develop
myk002 2021-06-28 12:30:19 -07:00
parent 87c7d02e09
commit 4eb8870797
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 6 additions and 0 deletions

@ -64,4 +64,10 @@ function test.enterSidebarMode()
guidm.enterSidebarMode(df.ui_sidebar_mode.Default)
expect.eq(df.ui_sidebar_mode.Default, df.global.ui.main.mode)
expect.eq('dwarfmode/Default', dfhack.gui.getCurFocus(true))
-- verify that all supported modes lead where we say they'll go
for k,v in pairs(guidm.SIDEBAR_MODE_KEYS) do
guidm.enterSidebarMode(k)
expect.eq(k, df.global.ui.main.mode)
end
end