2021-08-21 16:15:27 +00:00
|
|
|
package assets
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestSanitizeFilename(t *testing.T) {
|
2021-09-27 03:35:42 +00:00
|
|
|
assert.Equal(t, "cool_filename.txt.wow", SanitizeFilename("cool filename.txt.wow"))
|
|
|
|
assert.Equal(t, "__hi_doggy__", SanitizeFilename("😎 hi doggy 🐶"))
|
|
|
|
assert.Equal(t, "newlines_aretotallylegal", SanitizeFilename("newlines\naretotallylegal"))
|
2021-08-21 16:15:27 +00:00
|
|
|
}
|