diff --git a/csync/tests/ownCloud/t1.pl b/csync/tests/ownCloud/t1.pl index 35ccff7dad..5834290b0b 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 886605d398..4f11159fac 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' );