diff --git a/hyde/ext/plugins/combine.py b/hyde/ext/plugins/combine.py index b005108..c4b2a82 100644 --- a/hyde/ext/plugins/combine.py +++ b/hyde/ext/plugins/combine.py @@ -55,7 +55,7 @@ class CombinePlugin(Plugin): self.logger.debug("No resources to combine for [%s]" % resource) return [] - return resources + return sorted(resources, key=lambda r: r.name) def begin_site(self): """ diff --git a/hyde/tests/ext/test_combine.py b/hyde/tests/ext/test_combine.py index 4cff807..2d3dbd8 100644 --- a/hyde/tests/ext/test_combine.py +++ b/hyde/tests/ext/test_combine.py @@ -50,8 +50,10 @@ combine: --- Last line""") - assert len(text.split("\n")) == 4 - assert text.split("\n")[-1] == "Last line" + assert text == """var a = 1 + 2; +var b = a + 3; +var c = a + 5; +Last line""" return def test_combine_bottom(self): @@ -64,8 +66,10 @@ combine: First line """) - assert len(text.split("\n")) == 4 - assert text.split("\n")[0] == "First line" + assert text == """First line +var a = 1 + 2; +var b = a + 3; +var c = a + 5;""" return def test_combine_remove(self):