chiark / gitweb /
Test suite: Canonicalise json output when generating aq
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Aug 2016 11:47:33 +0000 (12:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Aug 2016 17:40:07 +0000 (18:40 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib

index 38605bd..f1ffa8b 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -253,7 +253,8 @@ t-archive-updated () {
                        "filename" => "$4",
                };
                END {
-                       print to_json \@v or die $!;
+                       my $json = JSON->new->canonical();
+                       print $json->encode(\@v) or die $!;
                }
        '
 }