blob: 176d85662775777ec169b70da204ab291f683643 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
package utils
import (
"path/filepath"
"testing"
)
func TestTrimTrailingSeparator(t *testing.T) {
if TrimTrailingSeparator("test"+string(filepath.Separator)) != "test" {
t.Error("Seprator should have been trimmed")
}
if TrimTrailingSeparator("test") != "test" {
t.Error("Path should not have changed")
}
}
|