Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Oct 15, 2024
1 parent b0c5a51 commit d9104be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import (
"github.com/stretchr/testify/assert"
)

func TestSubstr(t *testing.T) {
assert.Equal(t, `web`, Substr(`webx_top`, ``, 3))
assert.Equal(t, `历史书`, Substr(`历史书籍`, ``, 3))
}

func TestTitleCase(t *testing.T) {
assert.Equal(t, `Webx_Top`, TitleCase(`webx_top`))
assert.Equal(t, `Webx Top`, TitleCase(`webx top`))
Expand Down

0 comments on commit d9104be

Please sign in to comment.