From 85c73978feb91f55ee350ab0636fe7d1f63e43ca Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 22 Jan 2022 15:00:55 +0300 Subject: [PATCH] fix TestIsRoot on windows --- misc_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc_test.go b/misc_test.go index 920f99a7..2541e048 100644 --- a/misc_test.go +++ b/misc_test.go @@ -1,13 +1,15 @@ package main import ( + "os" "reflect" "testing" ) func TestIsRoot(t *testing.T) { - if !isRoot("/") { - t.Errorf(`"/" is root`) + sep := string(os.PathSeparator) + if !isRoot(sep) { + t.Errorf(`"%s" is root`, sep) } paths := []string{