Use filepath.Separator in test code, to fix tests on Windows

This commit is contained in:
Hilko Bengen 2019-03-11 20:20:35 +01:00
parent 72cabd552e
commit 9b520d0821
1 changed files with 2 additions and 2 deletions

View File

@ -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)