bug 714347 - pymake sort function should remove duplicates. r=khuey

--HG--
extra : rebase_source : 0a39a2a1578856f7c9c15b4e43b58961dc8088a7
This commit is contained in:
Ted Mielczarek 2012-01-03 12:54:21 -05:00
parent e3fa9fe41b
commit aab1b4ef7b
2 changed files with 6 additions and 3 deletions

View File

@ -193,9 +193,8 @@ class SortFunction(Function):
__slots__ = Function.__slots__
def resolve(self, makefile, variables, fd, setting):
d = list(self._arguments[0].resolvesplit(makefile, variables, setting))
d.sort()
util.joiniter(fd, d)
d = set(self._arguments[0].resolvesplit(makefile, variables, setting))
util.joiniter(fd, sorted(d))
class WordFunction(Function):
name = 'word'

View File

@ -0,0 +1,4 @@
# sort should remove duplicates
all:
@test "$(sort x a y b z c a z b x c y)" = "a b c x y z"
@echo "TEST-PASS"