Fixed issue with using startproject API in CodeLite
- Added test to ensure this doesn't break again
This commit is contained in:
parent
39367d6c57
commit
83e0229a2a
@ -44,8 +44,11 @@
|
||||
local prjpath = p.filename(prj, ".project")
|
||||
prjpath = path.getrelative(prj.workspace.location, prjpath)
|
||||
|
||||
local active = iif(prj.name == wks.startproject, ' Active="Yes"', '')
|
||||
_x(1, '<Project Name="%s" Path="%s"%s/>', prj.name, prjpath, active)
|
||||
if (prj.name == wks.startproject) then
|
||||
_x(1, '<Project Name="%s" Path="%s" Active="Yes"/>', prj.name, prjpath)
|
||||
else
|
||||
_x(1, '<Project Name="%s" Path="%s"/>', prj.name, prjpath)
|
||||
end
|
||||
end,
|
||||
|
||||
onbranch = function(n)
|
||||
|
@ -129,3 +129,24 @@
|
||||
</CodeLite_Workspace>
|
||||
]])
|
||||
end
|
||||
|
||||
|
||||
function suite.onActiveProject()
|
||||
workspace("MyWorkspace")
|
||||
startproject "MyProject"
|
||||
prepare()
|
||||
test.capture([[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CodeLite_Workspace Name="MyWorkspace" Database="" SWTLW="No">
|
||||
<Project Name="MyProject" Path="MyProject.project" Active="Yes"/>
|
||||
<BuildMatrix>
|
||||
<WorkspaceConfiguration Name="Debug" Selected="yes">
|
||||
<Project Name="MyProject" ConfigName="Debug"/>
|
||||
</WorkspaceConfiguration>
|
||||
<WorkspaceConfiguration Name="Release" Selected="yes">
|
||||
<Project Name="MyProject" ConfigName="Release"/>
|
||||
</WorkspaceConfiguration>
|
||||
</BuildMatrix>
|
||||
</CodeLite_Workspace>
|
||||
]])
|
||||
end
|
||||
|
Reference in New Issue
Block a user