Fix Codelite generation of empty source tree project.
This commit is contained in:
parent
190ee8bbf3
commit
e83a9046c1
@ -116,6 +116,11 @@
|
||||
|
||||
function m.files(prj)
|
||||
local tr = project.getsourcetree(prj)
|
||||
if #tr.children == 0 then
|
||||
-- handle project without files
|
||||
_p(1, '<VirtualDirectory Name="%s"/>', tr.name)
|
||||
return
|
||||
end
|
||||
tree.traverse(tr, {
|
||||
-- folders are handled at the internal nodes
|
||||
onbranchenter = function(node, depth)
|
||||
|
@ -100,3 +100,11 @@
|
||||
</GlobalSettings>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.OnProject_EmptySourceFiles()
|
||||
prepare()
|
||||
codelite.project.files(prj)
|
||||
test.capture [[
|
||||
<VirtualDirectory Name="MyProject"/>
|
||||
]]
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user