@ -1,3 +1,5 @@
config.targets = 'core'
function test.getCurViewscreen()
local scr = dfhack.gui.getCurViewscreen()
local scr2 = df.global.gview.view
@ -18,7 +20,7 @@ function test.getViewscreenByType()
local bad_type = df.viewscreen_titlest
if scr._type == bad_type then
bad_type = df.viewscreen_optionst
bad_type = df.viewscreen_dwarfmodest
end
local scr_bad = dfhack.gui.getViewscreenByType(bad_type)
expect.eq(scr_bad, nil)
@ -1,4 +1,5 @@
config.mode = 'title'
local function clean_vec(vec)
while #vec > 0 do
function test.overlappingGlobals()
local globals = {}
for name, _ in pairs(df.global) do
function test.index_name()
for _, k in ipairs(df.units_other_id) do
expect.eq(df.global.world.units.other[k]._kind, 'container')
utils = require('utils')
function with_temp_ref(...)
function test.get()
dfhack.with_temp_object(df.unit:new(), function(unit)
expect.eq(unit:_field('hist_figure_id').ref_target, df.historical_figure)
function test.struct()
expect.eq(df.coord._kind, 'struct-type')
expect.eq(tostring(df.coord), '<type: coord>')
local utils = require('utils')
function test.unit_action_fields()