| OLD | NEW |
| 1 var testCases = [ | 1 var testCases = [ |
| 2 { | 2 { |
| 3 name: 'RestrictedChars', | 3 name: 'RestrictedChars', |
| 4 precondition: [ | 4 precondition: [ |
| 5 {fullPath:'/ab', isDirectory:true}, | 5 {fullPath:'/ab', isDirectory:true}, |
| 6 ], | 6 ], |
| 7 tests: [ | 7 tests: [ |
| 8 // Test for difficult characters in 'path' parameters. | 8 // Test for difficult characters in 'path' parameters. |
| 9 function(helper) { helper.getFile('/', 'a<b', {create:true}, 0); }, | 9 function(helper) { helper.getFile('/', 'a<b', {create:true}, 0); }, |
| 10 function(helper) { helper.getFile('/', 'a>b', {create:true}, 0); }, | 10 function(helper) { helper.getFile('/', 'a>b', {create:true}, 0); }, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 function(helper) { helper.getFile('/', '|ab', {create:true}, 0); }, | 22 function(helper) { helper.getFile('/', '|ab', {create:true}, 0); }, |
| 23 | 23 |
| 24 function(helper) { helper.getFile('/', 'ab<', {create:true}, 0); }, | 24 function(helper) { helper.getFile('/', 'ab<', {create:true}, 0); }, |
| 25 function(helper) { helper.getFile('/', 'ab:', {create:true}, 0); }, | 25 function(helper) { helper.getFile('/', 'ab:', {create:true}, 0); }, |
| 26 function(helper) { helper.getFile('/', 'ab?', {create:true}, 0); }, | 26 function(helper) { helper.getFile('/', 'ab?', {create:true}, 0); }, |
| 27 function(helper) { helper.getFile('/', 'ab*', {create:true}, 0); }, | 27 function(helper) { helper.getFile('/', 'ab*', {create:true}, 0); }, |
| 28 function(helper) { helper.getFile('/', 'ab"', {create:true}, 0); }, | 28 function(helper) { helper.getFile('/', 'ab"', {create:true}, 0); }, |
| 29 function(helper) { helper.getFile('/', 'ab|', {create:true}, 0); }, | 29 function(helper) { helper.getFile('/', 'ab|', {create:true}, 0); }, |
| 30 | 30 |
| 31 // Only '\\' is disallowed. | 31 // Only '\\' is disallowed. |
| 32 function(helper) { helper.getFile('/', 'a\\b', {create:true}, FileEr
ror.INVALID_MODIFICATION_ERR); }, | 32 function(helper) { helper.getFile('/', 'a\\b', {create:true}, 'Inval
idModificationError'); }, |
| 33 | 33 |
| 34 // Test for difficult characters in 'name' parameters. | 34 // Test for difficult characters in 'name' parameters. |
| 35 function(helper) { helper.copy('/ab', '/', ' a<b', 0); }, | 35 function(helper) { helper.copy('/ab', '/', ' a<b', 0); }, |
| 36 function(helper) { helper.copy('/ab', '/', ' a:b', 0); }, | 36 function(helper) { helper.copy('/ab', '/', ' a:b', 0); }, |
| 37 function(helper) { helper.copy('/ab', '/', ' a?b', 0); }, | 37 function(helper) { helper.copy('/ab', '/', ' a?b', 0); }, |
| 38 function(helper) { helper.copy('/ab', '/', ' a*b', 0); }, | 38 function(helper) { helper.copy('/ab', '/', ' a*b', 0); }, |
| 39 function(helper) { helper.copy('/ab', '/', ' a"b', 0); }, | 39 function(helper) { helper.copy('/ab', '/', ' a"b', 0); }, |
| 40 function(helper) { helper.copy('/ab', '/', ' a|b', 0); }, | 40 function(helper) { helper.copy('/ab', '/', ' a|b', 0); }, |
| 41 | 41 |
| 42 // 'Name' parameter cannot contain '/' or '\\'. | 42 // 'Name' parameter cannot contain '/' or '\\'. |
| 43 function(helper) { helper.copy('/ab', '/', 'a/b', FileError.INVALID_
MODIFICATION_ERR); }, | 43 function(helper) { helper.copy('/ab', '/', 'a/b', 'InvalidModificati
onError'); }, |
| 44 function(helper) { helper.copy('/ab', '/', 'a\\b', FileError.INVALID
_MODIFICATION_ERR); }, | 44 function(helper) { helper.copy('/ab', '/', 'a\\b', 'InvalidModificat
ionError'); }, |
| 45 ], | 45 ], |
| 46 postcondition: [ | 46 postcondition: [ |
| 47 {fullPath:'/ab', isDirectory:true}, | 47 {fullPath:'/ab', isDirectory:true}, |
| 48 {fullPath:'a<b', isDirectory:false}, | 48 {fullPath:'a<b', isDirectory:false}, |
| 49 {fullPath:' a|b', isDirectory:true} | 49 {fullPath:' a|b', isDirectory:true} |
| 50 ], | 50 ], |
| 51 }, | 51 }, |
| 52 ]; | 52 ]; |
| OLD | NEW |