summaryrefslogtreecommitdiff
path: root/selftest/diff-subunit.pl
blob: 225c3d8986b421761ddb6f20c0a5c8ea87e2cf10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;