From 9405a9fd6ced89701abbb426a9d4877fabfab657 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Thu, 30 Sep 2021 11:47:22 +0200 Subject: fix symlink tests for windows ye olde filepath.Separator --- repo_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'repo_test.go') diff --git a/repo_test.go b/repo_test.go index fda61f5..9e7b09b 100644 --- a/repo_test.go +++ b/repo_test.go @@ -207,8 +207,9 @@ func TestSymlinks(t *testing.T) { if files[0].Link != "" { t.Error("existing should not be a link, actual:", files[0].Link) } - if files[1].Link != "/existing" { - t.Error("linkexisting should point to '/existing', actual:", files[1].Link) + expected := string(filepath.Separator) + "existing" + if files[1].Link != expected { + t.Error("linkexisting should point to", expected, "actual:", files[1].Link) } if !strings.Contains(output.String(), "linkexternal") { t.Errorf("log should contain a warning for linkexternal, actual %q", &output) -- cgit v1.2.3