diff options
Diffstat (limited to 'selftest/diff-subunit.pl')
-rwxr-xr-x | selftest/diff-subunit.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/selftest/diff-subunit.pl b/selftest/diff-subunit.pl new file mode 100755 index 0000000000..225c3d8986 --- /dev/null +++ b/selftest/diff-subunit.pl @@ -0,0 +1,24 @@ +#!/usr/bin/perl +# Diff two subunit streams +# Copyright (C) Jelmer Vernooij <jelmer@samba.org> +# Published under the GNU GPL, v3 or later + +use Getopt::Long; +use strict; +use FindBin qw($RealBin $Script); +use lib "$RealBin"; +use Subunit::Diff; + +open(FH1, $ARGV[0]) or die("Unable to open $ARGV[0]: $!"); +open(FH2, $ARGV[1]) or die("Unable to open $ARGV[1]: $!"); + +my $ret = Subunit::Diff::diff(*FH1, *FH2); + +close(FH1); +close(FH2); + +foreach my $e (keys %$ret) { + printf "%s: %s -> %s\n", $e, $ret->{$e}[0], $ret->{$e}[1]; +} + +0; |