mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
bug 714347 - pymake sort function should remove duplicates. r=khuey
--HG-- extra : rebase_source : 0a39a2a1578856f7c9c15b4e43b58961dc8088a7
This commit is contained in:
parent
e3fa9fe41b
commit
aab1b4ef7b
@ -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'
|
||||
|
4
build/pymake/tests/sort.mk
Normal file
4
build/pymake/tests/sort.mk
Normal 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"
|
Loading…
x
Reference in New Issue
Block a user