From ea04ae30e12ef13b7fe49db7975e042095184321 Mon Sep 17 00:00:00 2001 From: Aurélien Aptel Date: Tue, 2 Jul 2013 11:16:13 +0200 Subject: test_smbclient_tarmode.pl: add test for xF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add test for extracting from a file list. Signed-off-by: Aurélien Aptel Reviewed-by: David Disseldorp Reviewed-by: Jim McDonough --- source3/script/tests/test_smbclient_tarmode.pl | 30 ++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl index 41c2b2fbe1c..89280569973 100755 --- a/source3/script/tests/test_smbclient_tarmode.pl +++ b/source3/script/tests/test_smbclient_tarmode.pl @@ -16,14 +16,14 @@ test_smbclient_tarmode.pl - Test for smbclient tar backup feature # c I r # # c X DONE # c X r # -# c F # +# c F DONE # c F r # # x DONE # x I DONE # x I r # # x X DONE # x X r # -# x F # +# x F DONE # x F r # use v5.16; @@ -145,6 +145,7 @@ my @all_tests = ( [\&test_extraction_normal], [\&test_extraction_include], [\&test_extraction_exclude], + [\&test_extraction_list], ); if($SINGLE_TEST == -1) { @@ -394,6 +395,31 @@ sub test_creation_list { return check_tar($TAR, \@inc_files); } +sub test_extraction_list { + say "TEST: extraction -- filelist"; + + my @inc_files; + my @all_files; + + for(qw(file_inc inc/b inc/c inc/dir/foo foo/bar zob)) { + my $f = File->new_remote($_); + $f->set_attr(); + push @all_files, $f; + push @inc_files, $f if /inc/; + } + + # store + smb_tar('', '-Tc', $TAR, $DIR); + my $err = check_tar($TAR, \@all_files); + return $err if $err > 0; + + reset_remote(); + + my $flist = File->new_local("$TMP/list", file_list(@inc_files)); + smb_tar('', '-TxF', $TAR, $flist->localpath); + return check_remote(\@inc_files); +} + ##### # IMPLEMENTATION -- cgit