@@ -98,7 +98,7 @@ func TestValidateUsername(t *testing.T) {
98
98
99
99
func TestValidateObjectPath (t * testing.T ) {
100
100
//Validate Obj Path
101
- validObjectPaths := []string {"/ path/to/object" , "/ file.txt" , "/ folder/file.txt" , "/ 我的图片.png" , "/ 我的文件/我的应用.exe" , "/ 私のビデオ.mp3" }
101
+ validObjectPaths := []string {"path/to/object" , "file.txt" , "folder/file.txt" , "我的图片.png" , "我的文件/我的应用.exe" , "私のビデオ.mp3, /video.mp3, /path/pic.png " }
102
102
for _ , path := range validObjectPaths {
103
103
err := ValidateObjectPath (path )
104
104
if err != nil {
@@ -111,12 +111,11 @@ func TestValidateObjectPath(t *testing.T) {
111
111
path string
112
112
error string
113
113
}{
114
- {"path/with/null" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
115
- {"/path/with/null\x00 character" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
116
- {"/path/with/invalid/characters/:" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
117
- {"/path/with/invalid/characters/*" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
118
- {"/path/with/invalid/characters/\" " , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
119
- {"/path/with/invalid/characters/<?" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
114
+ {"path/with/null\x00 character" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
115
+ {"path/with/invalid/characters/:" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
116
+ {"path/with/invalid/characters/*" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
117
+ {"path/with/invalid/characters/\" " , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
118
+ {"path/with/invalid/characters/<?" , "invalid object path: it must not contain null characters or NTFS forbidden characters" },
120
119
}
121
120
122
121
for _ , testCase := range invalidObjectPaths {
0 commit comments