@@ -98,7 +98,7 @@ func TestValidateUsername(t *testing.T) {
9898
9999func TestValidateObjectPath (t * testing.T ) {
100100 //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 " }
102102 for _ , path := range validObjectPaths {
103103 err := ValidateObjectPath (path )
104104 if err != nil {
@@ -111,12 +111,11 @@ func TestValidateObjectPath(t *testing.T) {
111111 path string
112112 error string
113113 }{
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" },
120119 }
121120
122121 for _ , testCase := range invalidObjectPaths {
0 commit comments