From dad2f5cb138c849d17d4b7dfc44ffeba89671cef Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Sat, 21 Dec 2024 13:47:53 +0200 Subject: [PATCH] pkg/glob: Simplify test with filepath.ToSlash --- pkg/glob/glob_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/glob/glob_test.go b/pkg/glob/glob_test.go index 3de0e79bf..e537ab779 100644 --- a/pkg/glob/glob_test.go +++ b/pkg/glob/glob_test.go @@ -2,10 +2,10 @@ package glob import ( "os" + "path/filepath" "reflect" "runtime" "sort" - "strings" "testing" "src.elv.sh/pkg/testutil" @@ -75,7 +75,7 @@ func TestGlob_Absolute(t *testing.T) { func testGlob(t *testing.T, abs bool) { dir := testutil.InTempDir(t) - dir = strings.ReplaceAll(dir, string(os.PathSeparator), "/") + dir = filepath.ToSlash(dir) for _, dir := range append(mkdirs, mkdirDots...) { err := os.Mkdir(dir, 0755)