Skip to content

Commit

Permalink
Use filepath.Separator in test code, to fix tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hillu committed Mar 30, 2020
1 parent 72cabd5 commit 9b520d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zipfs/zipfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func TestZipFS(t *testing.T) {
if s, _ := d.Stat(); !s.IsDir() {
t.Error(`expected root ("/") to be a directory`)
}
if n := d.Name(); n != "/" {
t.Errorf("Wrong Name() of root directory: Expected: '/', got '%s'", n)
if n := d.Name(); n != string(filepath.Separator) {
t.Errorf("Wrong Name() of root directory: Expected: '%c', got '%s'", filepath.Separator, n)
}

buf = make([]byte, 8192)
Expand Down

0 comments on commit 9b520d0

Please sign in to comment.