From 9b520d08216160cf4ac57820fc3f3a2c6634916f Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Mon, 11 Mar 2019 20:20:35 +0100 Subject: [PATCH] Use filepath.Separator in test code, to fix tests on Windows --- zipfs/zipfs_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipfs/zipfs_test.go b/zipfs/zipfs_test.go index 7a141cb..bf781cc 100644 --- a/zipfs/zipfs_test.go +++ b/zipfs/zipfs_test.go @@ -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)