From 0fe4c01a285291aad0e1093da8b150c4e6349e1a Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Wed, 5 Dec 2018 08:24:14 +0100 Subject: [PATCH] lib/db: Fix broken test on Windows (#5347) --- lib/db/set_test.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/db/set_test.go b/lib/db/set_test.go index 169ccc49..d6174e69 100644 --- a/lib/db/set_test.go +++ b/lib/db/set_test.go @@ -10,6 +10,7 @@ import ( "bytes" "fmt" "os" + "path/filepath" "sort" "testing" "time" @@ -1341,11 +1342,11 @@ func TestCaseSensitive(t *testing.T) { s := db.NewFileSet("test", fs.NewFilesystem(fs.FilesystemTypeBasic, "."), ldb) local := []protocol.FileInfo{ - {Name: "D1/f1", Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, - {Name: "F1", Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, - {Name: "d1/F1", Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, - {Name: "d1/f1", Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, - {Name: "f1", Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, + {Name: filepath.FromSlash("D1/f1"), Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, + {Name: filepath.FromSlash("F1"), Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, + {Name: filepath.FromSlash("d1/F1"), Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, + {Name: filepath.FromSlash("d1/f1"), Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, + {Name: filepath.FromSlash("f1"), Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}}, } replace(s, protocol.LocalDeviceID, local)