Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/ownCloud/t4.pl17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ownCloud/t4.pl b/tests/ownCloud/t4.pl
index 2e54c5288..57159fe07 100755
--- a/tests/ownCloud/t4.pl
+++ b/tests/ownCloud/t4.pl
@@ -89,11 +89,28 @@ assertLocalAndRemoteDir( '', 1 );
printInfo("Remove a directory containing a local file\n");
remoteCleanup('test_stat');
+
+#Add an executable file for next test
+system( "echo echo hello >> " . localDir() . 'echo.sh' );
+chmod 0751, localDir() . 'echo.sh';
+
csync();
assertLocalAndRemoteDir( '', 0 );
+open(my $fh, "<", localDir() . 'echo.sh');
+my $perm = (stat $fh)[2] & 07777;
+assert( $perm eq 0751, "permissions not kept" );
+
+printInfo("Modify a file in the remote and check its permission\n");
+system( "echo \"echo bonjour\" > /tmp/echo.sh" );
+put_to_dir( '/tmp/echo.sh', "" );
+csync();
+assertLocalAndRemoteDir( '', 0 );
+open(my $fh, "<", localDir() . 'echo.sh');
+my $perm = (stat $fh)[2] & 07777;
+assert( $perm eq 0751, "permissions not kept" );
cleanup();