diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-06-05 17:37:41 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-06-11 19:59:59 +0200 |
commit | 9faaffa87bbc4f427cabd5debbbab77582c1343c (patch) | |
tree | 64d42e06c9653b8ef74ffe0b78ed3431edc041e2 /selftest/diff-subunit.pl | |
parent | 84f2d3001dd8a9e8734d0b36f4e1445fc1a8254c (diff) | |
download | samba-9faaffa87bbc4f427cabd5debbbab77582c1343c.tar.gz samba-9faaffa87bbc4f427cabd5debbbab77582c1343c.tar.xz samba-9faaffa87bbc4f427cabd5debbbab77582c1343c.zip |
selftest: Make it easier to do subunit diffs from other apps.
Diffstat (limited to 'selftest/diff-subunit.pl')
-rwxr-xr-x | selftest/diff-subunit.pl | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/selftest/diff-subunit.pl b/selftest/diff-subunit.pl index 225c3d8986b..280021ccc49 100755 --- a/selftest/diff-subunit.pl +++ b/selftest/diff-subunit.pl @@ -9,13 +9,10 @@ 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 $old = Subunit::Diff::from_file($ARGV[0]); +my $new = Subunit::Diff::from_file($ARGV[1]); -my $ret = Subunit::Diff::diff(*FH1, *FH2); - -close(FH1); -close(FH2); +my $ret = Subunit::Diff::diff($old, $new); foreach my $e (keys %$ret) { printf "%s: %s -> %s\n", $e, $ret->{$e}[0], $ret->{$e}[1]; |