summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2012-09-11 22:57:18 -0400
committerShaun McCance <shaunm@gnome.org>2012-09-11 22:57:18 -0400
commit429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72 (patch)
treee515e8084b453da08ae7b35210c01d320640cc5b
parent13e8e0c2ab1fb8c793e86e35fa12cbd7694f7f63 (diff)
downloaditstool-429131c2ffe3fd69d3f29a66ae7eb9ea127b4e72.tar.gz
Sort attribute names in test output
-rwxr-xr-xitstool.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/itstool.in b/itstool.in
index ed43754..82c9a2a 100755
--- a/itstool.in
+++ b/itstool.in
@@ -1128,8 +1128,8 @@ class Document (object):
sys.stderr.write('Error: Unrecognized category %s\n' % category)
sys.exit(1)
out.write('%s\t%s\n' % (xml_get_node_path(node), compval))
- for child in xml_attr_iter(node):
- self.output_test_data(category, out, child)
+ for attr in sorted(xml_attr_iter(node), lambda x, y: cmp(str(x), str(y))):
+ self.output_test_data(category, out, attr)
for child in xml_child_iter(node):
if child.type == 'element':
self.output_test_data(category, out, child)