parent
76e817b5e1
commit
f23cb97d1a
37 changed files with 188 additions and 472 deletions
|
|
@ -1,7 +1,7 @@
|
|||
local t = require "spec.testutils"
|
||||
local child, T, iferr = t.setup "iferr"
|
||||
local child, T = t.setup "iferr"
|
||||
|
||||
iferr["should add if != nil {"] = function()
|
||||
T["iferr"]["should add if != nil {"] = function()
|
||||
local rs = t.setup_test("iferr/iferr", child, { 8, 2 })
|
||||
child.cmd "GoIfErr"
|
||||
child.cmd "write"
|
||||
|
|
@ -10,7 +10,7 @@ iferr["should add if != nil {"] = function()
|
|||
t.cleanup(rs)
|
||||
end
|
||||
|
||||
iferr["should add if err with custom message"] = function()
|
||||
T["iferr"]["should add if err with custom message"] = function()
|
||||
child.lua [[
|
||||
require("gopher").setup {
|
||||
iferr = { message = 'fmt.Errorf("failed to %w", err)' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue