1
0
mirror of https://github.com/danog/gojekyll.git synced 2025-01-23 10:31:16 +01:00
gojekyll/page_test.go
2017-06-15 09:34:51 -04:00

16 lines
450 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHyphenateNonAlphaSequence(t *testing.T) {
assert.Equal(t, "abc", hyphenateNonAlphaSequence("abc"))
assert.Equal(t, "ab-c", hyphenateNonAlphaSequence("ab.c"))
assert.Equal(t, "ab-c", hyphenateNonAlphaSequence("ab-c"))
assert.Equal(t, "ab-c", hyphenateNonAlphaSequence("ab()[]c"))
assert.Equal(t, "ab123-cde-f-g", hyphenateNonAlphaSequence("ab123(cde)[]f.g"))
}