From 9246408278fe62daa674ca653548a3bd00ca74c1 Mon Sep 17 00:00:00 2001 From: Zack Date: Thu, 30 May 2024 15:21:51 -0700 Subject: [PATCH] for valid filename tests --- src/utils/utils_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/utils_test.go b/src/utils/utils_test.go index 39c91b98e..a479189ec 100644 --- a/src/utils/utils_test.go +++ b/src/utils/utils_test.go @@ -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​")) }