Add utils.

This commit is contained in:
Amy Boyd
2016-06-22 23:06:09 +01:00
parent 16490522ea
commit e21711568e
2 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package editorconfig
import (
"testing"
)
func TestGetParentDir(t *testing.T) {
if GetParentDir("a/b/c.txt") != "a/b" {
t.Error()
}
if GetParentDir("/") != "/" {
t.Error()
}
if GetParentDir("/a/b") != "/a" {
t.Error()
}
}