Add capitalization tests #737

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-12-23 22:54:46 +01:00
parent 837fc495f9
commit 92b99060c1
2 changed files with 8 additions and 2 deletions

View file

@ -73,13 +73,16 @@ func TestTitle(t *testing.T) {
t.Run("youtube", func(t *testing.T) {
assert.Equal(t, "YouTube", Title("youtube"))
})
t.Run("interpunctio-1", func(t *testing.T) {
t.Run("interpunction-1", func(t *testing.T) {
assert.Equal(t, "This,,, Is !a ! a Very Strange Title....", Title("this,,, is !a ! a very strange title...."))
})
t.Run("interpunctio-2", func(t *testing.T) {
t.Run("interpunction-2", func(t *testing.T) {
assert.Equal(t, "This Is a Not So Strange Title!", Title("This is a not so strange title!"))
})
t.Run("horse", func(t *testing.T) {
assert.Equal(t, "A Horse Is Not a Cow :-)", Title("a horse is not a cow :-)"))
})
t.Run("NewYears", func(t *testing.T) {
assert.Equal(t, "Boston New Year's", Title("boston new year's"))
})
}

View file

@ -86,4 +86,7 @@ func TestFileTitle(t *testing.T) {
t.Run("plus", func(t *testing.T) {
assert.Equal(t, "Foo+Bar, Du + Ich & Er", FileTitle("Foo+bar, du + ich & er +"))
})
t.Run("NewYears", func(t *testing.T) {
assert.Equal(t, "Boston New Year's", FileTitle("boston new year's"))
})
}