Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liderman committed Nov 14, 2021
1 parent c672d25 commit 8c17c13
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cached-text-generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestCustomCachedGenerate(t *testing.T) {
func TestCachedTextGenerator_CustomGenerateConfig(t *testing.T) {
tg := New()
NewCached(tg, 10).Configure('[', ']', '!')
assert.Equal(t, tg.startTag, "[")
assert.Equal(t, tg.endTag, "]")
assert.Equal(t, tg.separator, "!")
assert.Equal(t, tg.startTag, rune('['))
assert.Equal(t, tg.endTag, rune(']'))
assert.Equal(t, tg.separator, rune('!'))
}
9 changes: 9 additions & 0 deletions text-generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ func TestTextGenerator_Generate(t *testing.T) {

t8 := tg.Generate("{|}")
assert.Equal(t, t8, "")

t9 := tg.Generate("{")
assert.Equal(t, t9, "{")

t10 := tg.Generate("}")
assert.Equal(t, t10, "}")

t11 := tg.Generate("|")
assert.Equal(t, t11, "|")
}

func TestTextGenerator_CustomGenerateConfig(t *testing.T) {
Expand Down

0 comments on commit 8c17c13

Please sign in to comment.