Skip to content

Commit

Permalink
targets -> target
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Aug 4, 2023
1 parent a6de9a2 commit 4c89af7
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ci/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ local function load_tests(file, tests)
dfhack.printerr('Skipping tests for unspecified target in ' .. file)
return true -- TODO: change to false once existing tests have targets specified
end
local targets = type(env.config.targets) == table and env.config.targets or {env.config.targets}
local targets = type(env.config.target) == table and env.config.target or {env.config.target}
for _,target in ipairs(targets) do
if target == 'core' then goto continue end
if type(target) ~= 'string' or not helpdb.is_entry(target) or
Expand Down
2 changes: 1 addition & 1 deletion test/core.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local function clean_path(p)
-- todo: replace with dfhack.filesystem call?
Expand Down
2 changes: 1 addition & 1 deletion test/encoding.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.toSearchNormalized()
expect.eq(dfhack.toSearchNormalized(''), '')
Expand Down
2 changes: 1 addition & 1 deletion test/gui.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.getCurViewscreen()
local scr = dfhack.gui.getCurViewscreen()
Expand Down
2 changes: 1 addition & 1 deletion test/library/argparse.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local argparse = require('argparse')
local guidm = require('gui.dwarfmode')
Expand Down
2 changes: 1 addition & 1 deletion test/library/gui.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local gui = require('gui')

Expand Down
2 changes: 1 addition & 1 deletion test/library/gui/dialogs.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--config.targets = 'core'
--config.target = 'core'

local gui = require('gui')
local function send_keys(...)
Expand Down
2 changes: 1 addition & 1 deletion test/library/gui/widgets.EditField.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local widgets = require('gui.widgets')

Expand Down
2 changes: 1 addition & 1 deletion test/library/gui/widgets.Label.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local gui = require('gui')
local widgets = require('gui.widgets')
Expand Down
2 changes: 1 addition & 1 deletion test/library/gui/widgets.Scrollbar.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local gui = require('gui')
local widgets = require('gui.widgets')
Expand Down
2 changes: 1 addition & 1 deletion test/library/gui/widgets.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local widgets = require('gui.widgets')

Expand Down
2 changes: 1 addition & 1 deletion test/library/helpdb.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local h = require('helpdb')

Expand Down
2 changes: 1 addition & 1 deletion test/library/misc.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- tests misc functions added by dfhack.lua

config.targets = 'core'
config.target = 'core'

function test.safe_pairs()
for k,v in safe_pairs(nil) do
Expand Down
2 changes: 1 addition & 1 deletion test/library/print.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- tests print-related functions added by dfhack.lua

config.targets = 'core'
config.target = 'core'

local dfhack = dfhack

Expand Down
2 changes: 1 addition & 1 deletion test/library/string.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- tests string functions added by dfhack.lua

config.targets = 'core'
config.target = 'core'

function test.startswith()
expect.true_(('abcd'):startswith(''))
Expand Down
2 changes: 1 addition & 1 deletion test/library/test_util/expect_unit.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local expect_raw = require('test_util.expect')

Expand Down
2 changes: 1 addition & 1 deletion test/library/test_util/mock.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local mock = require('test_util.mock')

Expand Down
2 changes: 1 addition & 1 deletion test/library/utils.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local utils = require 'utils'

Expand Down
2 changes: 1 addition & 1 deletion test/structures/find.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
config.mode = 'title'
config.targets = 'core'
config.target = 'core'

local function clean_vec(vec)
while #vec > 0 do
Expand Down
3 changes: 1 addition & 2 deletions test/structures/misc.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- TODO: fix crash in test.viewscreenDtors with viewscreen_legendsst
--config.targets = 'core'
config.target = 'core'

function test.overlappingGlobals()
local globals = {}
Expand Down
2 changes: 1 addition & 1 deletion test/structures/other_vectors.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.index_name()
for _, k in ipairs(df.units_other_id) do
Expand Down
2 changes: 1 addition & 1 deletion test/structures/primitive_refs.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

utils = require('utils')

Expand Down
2 changes: 1 addition & 1 deletion test/structures/ref_target.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.get()
dfhack.with_temp_object(df.unit:new(), function(unit)
Expand Down
2 changes: 1 addition & 1 deletion test/structures/types_meta.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.struct()
expect.eq(df.coord._kind, 'struct-type')
Expand Down
2 changes: 1 addition & 1 deletion test/structures/unions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

local utils = require('utils')

Expand Down
2 changes: 1 addition & 1 deletion test/test.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
config.targets = 'core'
config.target = 'core'

function test.internal_in_test()
expect.true_(dfhack.internal.IN_TEST)
Expand Down

0 comments on commit 4c89af7

Please sign in to comment.