mirror of
https://github.com/danog/gojekyll.git
synced 2025-01-23 03:41:14 +01:00
16 lines
450 B
Go
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"))
|
|
}
|