mirror of
https://github.com/go-task/task.git
synced 2024-12-16 10:59:23 +02:00
33b167215d
- this makes it impossible to import these packages outside Task - as a side effect, it makes the root directory cleaner
22 lines
405 B
Go
22 lines
405 B
Go
package status
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNormalizeFilename(t *testing.T) {
|
|
tests := []struct {
|
|
In, Out string
|
|
}{
|
|
{"foobarbaz", "foobarbaz"},
|
|
{"foo/bar/baz", "foo-bar-baz"},
|
|
{"foo@bar/baz", "foo-bar-baz"},
|
|
{"foo1bar2baz3", "foo1bar2baz3"},
|
|
}
|
|
for _, test := range tests {
|
|
assert.Equal(t, test.Out, (&Checksum{}).normalizeFilename(test.In))
|
|
}
|
|
}
|