diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-30 11:47:22 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-30 11:47:22 +0200 |
commit | 9405a9fd6ced89701abbb426a9d4877fabfab657 (patch) | |
tree | 5067302d4a2ab545f7fcbe89817550d85d618261 | |
parent | 69294759ea36c8395a956e418820b236be7fd875 (diff) | |
download | dna-backup-9405a9fd6ced89701abbb426a9d4877fabfab657.tar.gz dna-backup-9405a9fd6ced89701abbb426a9d4877fabfab657.zip |
fix symlink tests for windows
ye olde filepath.Separator
-rw-r--r-- | repo_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
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) |