1
0
mirror of https://github.com/danog/gojekyll.git synced 2025-01-23 06:01:20 +01:00
gojekyll/page_test.go

16 lines
450 B
Go
Raw Normal View History

2017-06-15 07:19:49 -04:00
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"))
}