mirror of
https://github.com/schollz/croc.git
synced 2025-10-10 21:01:02 +02:00
fix: test
This commit is contained in:
parent
713b691e60
commit
33667839c6
1 changed files with 1 additions and 1 deletions
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue