1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-10 12:51:01 +02:00

fix: test

This commit is contained in:
paulmiro 2025-08-11 16:10:10 +02:00
parent 713b691e60
commit 33667839c6

View file

@ -273,7 +273,7 @@ func TestValidFileName(t *testing.T) {
assert.NotNil(t, ValidFileName("hi"+string(os.PathSeparator)+".."+string(os.PathSeparator)+".."+string(os.PathSeparator)+"txt"))
// contains ".." between a path separator and the beginning or end of the path
assert.NotNil(t, ValidFileName(".."+string(os.PathSeparator)+"hi.txt"))
assert.NotNil(t, ValidFileName("hi"+string(os.PathSeparator)+".."))
assert.NotNil(t, ValidFileName("hi"+string(os.PathSeparator)+".."+string(os.PathSeparator)+".."+string(os.PathSeparator)+"hi.txt"))
assert.NotNil(t, ValidFileName(".."))
// is an absolute path
assert.NotNil(t, ValidFileName(path.Join(string(os.PathSeparator), "abs", string(os.PathSeparator), "hi.txt")))