Skip to content

Commit

Permalink
pkg/glob: Simplify test with filepath.ToSlash
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored and xiaq committed Jan 5, 2025
1 parent 3e41d29 commit dad2f5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/glob/glob_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package glob

import (
"os"
"path/filepath"
"reflect"
"runtime"
"sort"
"strings"
"testing"

"src.elv.sh/pkg/testutil"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dad2f5c

Please sign in to comment.