mirror of
https://github.com/schollz/croc.git
synced 2024-11-24 08:02:33 +03:00
for valid filename tests
This commit is contained in:
parent
fbf1eeedce
commit
9246408278
@ -253,6 +253,10 @@ func TestIsLocalIP(t *testing.T) {
|
|||||||
func TestValidFileName(t *testing.T) {
|
func TestValidFileName(t *testing.T) {
|
||||||
// contains regular characters
|
// contains regular characters
|
||||||
assert.True(t, ValidFileName("中文.csl"))
|
assert.True(t, ValidFileName("中文.csl"))
|
||||||
|
// contains regular characters
|
||||||
|
assert.True(t, ValidFileName("[something].csl"))
|
||||||
|
// contains regular characters
|
||||||
|
assert.True(t, ValidFileName("[(something)].csl"))
|
||||||
// contains invisible character
|
// contains invisible character
|
||||||
assert.False(t, ValidFileName("D中文.cslouglas"))
|
assert.False(t, ValidFileName("D中文.cslouglas"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user