Add support for named tests (#50)

* fix(typo): README.md (#47)

* feat: add support for named tests

* test

* tags in table

* debug installer msg

* test

* hardcoded @develop

* get gotests tag from setup()

* update readme

* store install tag in urls table

* removed gotests tag

* update README.md

* remove urls installer index reference

* remove named arg from add_test()

* .

* update README.md

* update README.md

---------

Co-authored-by: Steve M <gearcog@users.noreply.github.com>
This commit is contained in:
Alex 2024-02-11 18:35:39 +04:00 committed by GitHub
parent 8a6f7748ef
commit cdb1cd05a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 47 additions and 1 deletions

View file

@ -27,6 +27,10 @@ local default_config = {
-- path to a directory containing custom test code templates
---@type string|nil
template_dir = nil,
-- switch table tests from using slice to map (with test name for the key)
-- works only with gotests installed from develop branch
---@type boolean
named = false,
},
---@class gopher.ConfigGoTag
gotag = {

View file

@ -6,6 +6,10 @@ local gotests = {}
---@param args table
local function add_test(args)
if c.gotests.named then
table.insert(args, "-named")
end
if c.gotests.template_dir then
table.insert(args, "-template_dir")
table.insert(args, c.gotests.template_dir)