tests: open file with umask 0777

Regression test for https://github.com/vgough/encfs/issues/181

(fails at the moment, fixed in the next commits)
This commit is contained in:
Jakob Unterwurzacher 2016-06-25 14:47:16 +02:00
parent 426d9dae76
commit 2b3e6031eb

View File

@ -2,7 +2,7 @@
# Test EncFS normal and paranoid mode
use Test::More tests => 102;
use Test::More tests => 104;
use File::Path;
use File::Copy;
use File::Temp;
@ -46,6 +46,7 @@ sub runTests
&renames;
&internalModification;
&grow;
&umask0777;
&cleanup;
}
@ -324,3 +325,12 @@ sub cleanup
ok( ! -d $workingDir, "working dir removed");
}
# Test that we can create and write to a a file even if umask is set to 0777
# Regression test for bug https://github.com/vgough/encfs/issues/181
sub umask0777
{
my $old = umask(0777);
ok(open(my $fh, "+>$crypt/umask0777"), "open with umask 0777");
close($fh);
umask($old);
}