mirror of
https://github.com/vgough/encfs.git
synced 2024-11-28 10:54:15 +01:00
parent
29dbb04a7d
commit
eb6b9d2887
@ -3,7 +3,7 @@
|
|||||||
# Test EncFS --reverse mode
|
# Test EncFS --reverse mode
|
||||||
|
|
||||||
use warnings;
|
use warnings;
|
||||||
use Test::More tests => 36;
|
use Test::More tests => 46;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
use File::Temp;
|
use File::Temp;
|
||||||
use IO::Handle;
|
use IO::Handle;
|
||||||
@ -111,7 +111,7 @@ sub copy_test
|
|||||||
sub encfsctl_cat_test
|
sub encfsctl_cat_test
|
||||||
{
|
{
|
||||||
my $contents = "hello world\n";
|
my $contents = "hello world\n";
|
||||||
ok( open(OUT, "> $plain/hello.txt"), "create file for encfsctl cat test" );
|
ok(open(OUT, "> $plain/hello.txt"), "create file for encfsctl cat test");
|
||||||
print OUT $contents;
|
print OUT $contents;
|
||||||
close OUT;
|
close OUT;
|
||||||
qx(ENCFS6_CONFIG=$plain/.encfs6.xml ./build/encfsctl cat --extpass="echo test" $ciphertext hello.txt > $plain/hellodec.txt);
|
qx(ENCFS6_CONFIG=$plain/.encfs6.xml ./build/encfsctl cat --extpass="echo test" $ciphertext hello.txt > $plain/hellodec.txt);
|
||||||
@ -126,12 +126,12 @@ sub encfsctl_cat_test
|
|||||||
sub symlink_test
|
sub symlink_test
|
||||||
{
|
{
|
||||||
my $target = shift;
|
my $target = shift;
|
||||||
symlink($target, "$plain/symlink");
|
ok(symlink($target, "$plain/symlink"), "Symlink create, $plain/symlink -> $target");
|
||||||
$dec = readlink("$decrypted/symlink");
|
ok(my $dec = readlink("$decrypted/symlink"), "Symlink read, $decrypted/symlink");
|
||||||
ok( $dec eq $target, "symlink to '$target'") or
|
$dec.="";
|
||||||
print("# (original) $target' != '$dec' (decrypted)\n");
|
ok($dec eq $target, "Symlink compare, '$target' != '$dec'");
|
||||||
my $return_code = ($have_xattr) ? system(@binattr, "$decrypted/symlink") : 0;
|
my $return_code = ($have_xattr) ? system(@binattr, "$decrypted/symlink") : 0;
|
||||||
is($return_code, 0, "symlink to '$target' extended attributes can be read (return code was $return_code)");
|
is($return_code, 0, "Symlink xattr, $plain/symlink -> $target, extended attributes can be read (return code was $return_code)");
|
||||||
unlink("$plain/symlink");
|
unlink("$plain/symlink");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user