| 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 |
|
| 8 |
symlink sym -> a/b |
| 9 |
cd sym/c/d |
| 10 |
|
| 11 |
go work use $WORK/gopath/src/x/y # "crosses" the symlink at $WORK/sym |
| 12 |
cmpenv go.work go.work.want # Check that the relative path is not used |
| 13 |
|
| 14 |
-- x/y/go.mod -- |
| 15 |
module example.com/y |
| 16 |
|
| 17 |
go 1.24 |
| 18 |
-- a/b/c/d/go.work -- |
| 19 |
go 1.24 |
| 20 |
-- a/b/c/d/go.work.want -- |
| 21 |
go 1.24 |
| 22 |
|
| 23 |
use $WORK${/}gopath${/}src${/}x${/}y |