diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-07-02 11:16:13 +0200 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2013-11-05 08:42:41 -0500 |
commit | ea04ae30e12ef13b7fe49db7975e042095184321 (patch) | |
tree | 6860f05ed48cf8b633e6b561085ad0df056a3bf5 /source3 | |
parent | aaf59c9db6e571b8d05f0e62a717be995c16285f (diff) | |
download | samba-ea04ae30e12ef13b7fe49db7975e042095184321.tar.gz samba-ea04ae30e12ef13b7fe49db7975e042095184321.tar.xz samba-ea04ae30e12ef13b7fe49db7975e042095184321.zip |
test_smbclient_tarmode.pl: add test for xF
Add test for extracting from a file list.
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')
-rwxr-xr-x | source3/script/tests/test_smbclient_tarmode.pl | 30 |
1 files changed, 28 insertions, 2 deletions
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 |