2020-05-03 18:00:50 +02:00
|
|
|
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"))
|
|
|
|
})
|
2021-08-22 16:14:34 +02:00
|
|
|
t.Run("empty string", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "“”", Quote(""))
|
|
|
|
})
|
2020-05-03 18:00:50 +02:00
|
|
|
}
|
2021-09-23 23:46:17 +02:00
|
|
|
|
|
|
|
func TestQuoteLower(t *testing.T) {
|
|
|
|
t.Run("The quick brown fox.", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "“the quick brown fox.”", QuoteLower("The quick brown fox."))
|
|
|
|
})
|
|
|
|
t.Run("filename.txt", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "filename.txt", QuoteLower("filename.txt"))
|
|
|
|
})
|
|
|
|
t.Run("empty string", func(t *testing.T) {
|
|
|
|
assert.Equal(t, "“”", QuoteLower(""))
|
|
|
|
})
|
|
|
|
}
|