mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
test fles with '%' and '#'
This commit is contained in:
parent
abafbef985
commit
08ca8b54b1
2 changed files with 21 additions and 0 deletions
|
@ -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." );
|
||||
|
|
|
@ -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' );
|
||||
|
|
Loading…
Reference in a new issue