Skip to content

Commit

Permalink
for valid filename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed May 30, 2024
1 parent fbf1eee commit 9246408
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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​"))
}

0 comments on commit 9246408

Please sign in to comment.