mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
for valid filename tests
This commit is contained in:
parent
fbf1eeedce
commit
9246408278
1 changed files with 4 additions and 0 deletions
|
@ -253,6 +253,10 @@ func TestIsLocalIP(t *testing.T) {
|
|||
func TestValidFileName(t *testing.T) {
|
||||
// contains regular characters
|
||||
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
|
||||
assert.False(t, ValidFileName("D中文.cslouglas"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue