Bug 3016050: {"../Dir/file1.c","../../Dir/file2.c"} breaks Xcode (Stephane)
This commit is contained in:
parent
e52f458c6c
commit
6da5323224
@ -24,6 +24,7 @@
|
||||
* Bug 3035545: The pattern { "./folder/*.c" } matches no files
|
||||
* Bug 3034222: StaticLib projects ignore linkoptions
|
||||
* Bug 3020382: GCC PCH not working
|
||||
* Bug 3016050: {"../Dir/file1.c","../../Dir/file2.c"} breaks Xcode (Stephane)
|
||||
|
||||
|
||||
-------
|
||||
|
@ -51,9 +51,12 @@
|
||||
return parentnode
|
||||
end
|
||||
|
||||
-- Create the child if necessary
|
||||
-- Create the child if necessary. If two children with the same name appear
|
||||
-- at the same level, make sure they have the same path to prevent conflicts
|
||||
-- i.e. ../Common and ../../Common can both appear at the top of the tree
|
||||
-- yet they have different paths (Bug #3016050)
|
||||
local childnode = parentnode.children[childname]
|
||||
if not childnode then
|
||||
if not childnode or childnode.path ~= p then
|
||||
childnode = tree.insert(parentnode, tree.new(childname))
|
||||
childnode.path = p
|
||||
end
|
||||
|
@ -69,6 +69,16 @@
|
||||
test.isequal("MyProject>hello", getresult())
|
||||
end
|
||||
|
||||
function suite.AddsNodes_OnDifferentParentLevel()
|
||||
tree.add(tr, "../Common")
|
||||
tree.add(tr, "../../Common")
|
||||
test.isequal(2, #tr.children)
|
||||
test.isequal("Common", tr.children[1].name)
|
||||
test.isequal("Common", tr.children[2].name)
|
||||
test.isequal("../Common", tr.children[1].path)
|
||||
test.isequal("../../Common", tr.children[2].path)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Tests for tree.getlocalpath()
|
||||
|
Reference in New Issue
Block a user