photoprism/pkg/txt/quote_test.go
Michael Mayer 2e85b3cccd People: Split facial recognition into smaller functions #22
Clustering and matching have been improved along the way. This opens
the door for further optimizations while keeping the code readable.
2021-08-22 16:14:34 +02:00

19 lines
435 B
Go

package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestQuote(t *testing.T) {
t.Run("The quick brown fox.", func(t *testing.T) {
assert.Equal(t, "“The quick brown fox.”", Quote("The quick brown fox."))
})
t.Run("filename.txt", func(t *testing.T) {
assert.Equal(t, "filename.txt", Quote("filename.txt"))
})
t.Run("empty string", func(t *testing.T) {
assert.Equal(t, "“”", Quote(""))
})
}