Skip to content

Commit

Permalink
Merge pull request #283 from thaJeztah/fix_TestFromDirSymlink_windows
Browse files Browse the repository at this point in the history
fix TestFromDirSymlink on Windows due to missing drive-letter
  • Loading branch information
dnephin authored Aug 29, 2024
2 parents db81ec0 + 109d43e commit 65a3150
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package fs_test
import (
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -31,14 +30,8 @@ func TestFromDirSymlink(t *testing.T) {
dir := fs.NewDir(t, "test-from-dir", fs.FromDir("testdata/copy-test-with-symlink"))
defer dir.Remove()

currentdir, err := os.Getwd()
assert.NilError(t, err)

link2 := filepath.FromSlash("../2")
link3 := "/some/inexistent/link"
if runtime.GOOS == "windows" {
link3 = filepath.Join(filepath.VolumeName(currentdir), link3)
}
link3 := filepath.FromSlash("/some/inexistent/link")

expected := fs.Expected(t,
fs.WithFile("1", "1\n"),
Expand Down

0 comments on commit 65a3150

Please sign in to comment.