...

Text file src/cmd/go/testdata/script/work_use_symlink_issue68383.txt

Documentation: cmd/go/testdata/script

     1# This is a test for #68383, where go work use is used in a CWD
     2# one of whose parent directories is a symlink, trying to use
     3# a directory that exists in a subdirectory of a parent of that
     4# directory.
     5
     6[!symlink] skip 'tests an issue involving symlinks'
     7
     8symlink sym -> a/b
     9cd sym/c/d
    10
    11go work use $WORK/gopath/src/x/y    # "crosses" the symlink at $WORK/sym
    12cmpenv go.work go.work.want  # Check that the relative path is not used
    13
    14-- x/y/go.mod --
    15module example.com/y
    16
    17go 1.24
    18-- a/b/c/d/go.work --
    19go 1.24
    20-- a/b/c/d/go.work.want --
    21go 1.24
    22
    23use $WORK${/}gopath${/}src${/}x${/}y

View as plain text