1 # Test case for #67623 in go.work files: make sure the errors are
2 # printed on lines starting with file and line number so they
3 # can be easily parsed by tools.
4
5 cp go.work.repeated.txt go.work
6 ! go list
7 stderr '^go.work:4: path .* appears multiple times in workspace$'
8
9 cp go.work.badgodebug.txt go.work
10 ! go list
11 stderr '^go.work:3: unknown godebug "foo"$'
12
13 cp go.work.unparsable.txt go.work
14 ! go list
15 stderr '^go.work:5: unknown directive: notadirective'
16
17 cp go.work.firstlineerr.txt go.work
18 ! go list
19 stderr '^go.work:1: unknown godebug "bar"$'
20
21 cp go.work.firsterrlisted.txt go.work
22 ! go list
23 stderr '^go.work:1: unknown godebug "baz"$'
24
25 -- foo/go.mod --
26 module example.com/foo
27 -- go.work.repeated.txt --
28
29
30 use foo
31 use foo
32 -- go.work.badgodebug.txt --
33
34
35 godebug foo=1
36 -- go.work.unparsable.txt --
37
38
39
40
41 notadirective
42 -- go.work.firstlineerr.txt --
43 godebug bar=1
44 -- go.work.firsterrlisted.txt --
45 godebug baz=1
46 godebug baz=1
47
View as plain text