Skip to content

Commit

Permalink
Update test.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi authored Jul 24, 2024
1 parent 4f359b2 commit dcd0c80
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions tests/projects/c++/modules/duplicate_name_detection/test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ import("core.base.semver")
import("utils.ci.is_running", {alias = "ci_is_running"})

function _build()
try {function()
if ci_is_running() then
os.iorun("xmake -rvD")
else
os.iorun("xmake -r")
end
end, catch {function(errors)
errors = errors.errors
if not errors or not errors:find("detected") then
raise("Modules duplicate name detection does not work\n%s", errors.errors)
end
end}}
try {
function()
if ci_is_running() then
os.iorun("xmake -rvD")
else
os.iorun("xmake -r")
end
end,
catch {
function (errors)
errors = tostring(errors)
if not errors:find("duplicate module name detected", 1, true) then
raise("Modules duplicate name detection does not work\n%s", errors)
end
end
}
}
end

function can_build()
Expand Down

0 comments on commit dcd0c80

Please sign in to comment.