[Pkg-owncloud-commits] [owncloud-client] 32/332: test fles with '%' and '#'

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 08ca8b54b154511de090fded892bb89cf525633f
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Jun 3 12:20:40 2014 +0200

    test fles with '%' and '#'
---
 csync/tests/ownCloud/t1.pl | 11 +++++++++++
 csync/tests/ownCloud/t3.pl | 10 ++++++++++
 2 files changed, 21 insertions(+)

diff --git a/csync/tests/ownCloud/t1.pl b/csync/tests/ownCloud/t1.pl
index 35ccff7..5834290 100755
--- a/csync/tests/ownCloud/t1.pl
+++ b/csync/tests/ownCloud/t1.pl
@@ -46,6 +46,7 @@ glob_put( 'toremote1/rtl1/rtl11/*',  "remoteToLocal1/rtl1/rtl11/" );
 glob_put( 'toremote1/rtl2/*', "remoteToLocal1/rtl2/" );
 glob_put( 'toremote1/rtl4/*', "remoteToLocal1/rtl4/" );
 
+
 # call csync, sync local t1 to remote t1
 csync();
 
@@ -74,9 +75,19 @@ foreach my $file ( <./tolocal1/*> ) {
     print "Copying $file to $locDir\n";
     copy( $file, $locDir );
 }
+
+# Also add a file with symbols
+my $symbolName = "a\%b#c\$d-e";
+system( "echo \"my symbols\" >>  $locDir/$symbolName" );
+
+#Also on the server
+put_to_dir( "$locDir/$symbolName", 'remoteToLocal1' );
+
+
 csync( );
 print "\nAssert local and remote dirs.\n";
 assertLocalAndRemoteDir( '', 0);
+assert( ! -e localDir().$symbolName );
 
 # move a local file
 printInfo( "Move a file locally." );
diff --git a/csync/tests/ownCloud/t3.pl b/csync/tests/ownCloud/t3.pl
index 886605d..4f11159 100755
--- a/csync/tests/ownCloud/t3.pl
+++ b/csync/tests/ownCloud/t3.pl
@@ -67,6 +67,13 @@ system( "rm -rf " . localDir() . 'remoteToLocal1' );
 system( "echo \"my file\" >> /tmp/myfile.txt" );
 put_to_dir( '/tmp/myfile.txt', 'remoteToLocal1/rtl1/rtl11' );
 
+# Also add a file with symbols
+my $symbolName = "a\%b#c\$d-e";
+
+system( "echo \"my symbols\" >> /tmp/$symbolName" );
+put_to_dir( "/tmp/$symbolName", 'remoteToLocal1/rtl1/rtl11' );
+
+
 my $fileid = remoteFileId( 'remoteToLocal1/rtl1/', 'rtl11' );
 my $fid2 =   remoteFileId( 'remoteToLocal1/rtl1/', 'La ced' );
 assert($fid2 eq "" or $fileid ne $fid2, "File IDs are equal" );
@@ -90,6 +97,9 @@ printInfo("Move file and create another one with the same name.");
 move( localDir() . 'newdir/myfile.txt', localDir() . 'newdir/oldfile.txt' );
 system( "echo \"super new\" >> " . localDir() . 'newdir/myfile.txt' );
 
+#Move a file with symbols as well
+move( localDir() . "newdir/$symbolName", localDir() . "newdir/$symbolName.new" );
+
 #Add some files for the next test.
 system( "echo \"un\" > " . localDir() . '1.txt' );
 system( "echo \"deux\" > " . localDir() . '2.txt' );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list