Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
schollz committed Jul 28, 2024
1 parent ce3c65e commit e439b65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"math/rand"
"os"
"path"
"strings"
"testing"

Expand Down Expand Up @@ -260,7 +261,7 @@ func TestValidFileName(t *testing.T) {
// contains invisible character
err := ValidFileName("D中文.cslouglas​")
assert.NotNil(t, err)
assert.Equal(t, "non-graphical unicode: e2808b U+8203 in 'D中文.cslouglas​'", err.Error())
assert.Equal(t, "non-graphical unicode: e2808b U+8203 in '44e4b8ade696872e63736c6f75676c6173e2808b'", err.Error())
assert.NotNil(t, ValidFileName("hi..txt"))
assert.NotNil(t, ValidFileName("/hi/something.txt"))
assert.NotNil(t, ValidFileName(path.Join(string(os.PathSeparator), "abs", string(os.PathSeparator), "hi.txt")))
}

0 comments on commit e439b65

Please sign in to comment.