diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-15 19:01:58 +0200 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2013-11-05 08:42:41 -0500 |
commit | 97c34f3e6f2a954a267624c9059de35d74e7c3dc (patch) | |
tree | be30b15f8f71ea0add82727c924aa0b157d66222 /source3/script/tests | |
parent | e879580f1cfd73fa62036316485cd30d011b8392 (diff) | |
download | samba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.tar.gz samba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.tar.xz samba-97c34f3e6f2a954a267624c9059de35d74e7c3dc.zip |
test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-x | source3/script/tests/test_smbclient_tarmode.pl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl index 6d09e1e4689..a2152cc6762 100755 --- a/source3/script/tests/test_smbclient_tarmode.pl +++ b/source3/script/tests/test_smbclient_tarmode.pl @@ -26,7 +26,7 @@ C<test_smbclient_tarmode.pl> - Test for smbclient tar backup feature # x F DONE # x F r DONE -use v5.16; +use v5.14; use strict; use warnings; @@ -36,7 +36,7 @@ use File::Path qw/make_path remove_tree/; use Getopt::Long; use Pod::Usage; use Term::ANSIColor; - +use Digest::MD5 qw/md5_hex/; sub d {print Dumper @_;} # DEFAULTS @@ -806,7 +806,12 @@ sub check_tar { $done{$p}++; # different file + my $md5 = $f->data; + if($^V lt v5.16) { + $md5 = md5_hex($md5); + } + if($md5 ne $h{$p}->md5) { say " ! $p ($md5)"; push @diff, $p; |