|
1 | | -# Broken on nocgo builders: https://golang.org/issue/26906 |
2 | | -[!cgo] skip |
3 | | - |
4 | 1 | env GO111MODULE=on |
5 | 2 |
|
6 | 3 | cd m |
|
9 | 6 | # the packages in the main module, but no other packages from the standard |
10 | 7 | # library or active modules. |
11 | 8 | go list all |
12 | | -cmp stdout all.txt |
| 9 | +stdout example.com/m/useunicode |
| 10 | +stdout example.com/m/useunsafe |
| 11 | +[cgo] stdout example.com/m/useC |
| 12 | +[!cgo] ! stdout example.com/m/useC |
| 13 | +stdout '^unicode$' |
| 14 | +stdout '^unsafe$' |
| 15 | +! stdout index/suffixarray |
13 | 16 |
|
14 | 17 | # 'go list ...' should list packages in all active modules and the standard library. |
15 | 18 | # BUG: It currently omits the standard library (https://golang.org/issue/26905). |
16 | 19 | go list ... |
17 | | -cmp stdout dots.txt |
| 20 | +stdout example.com/unused/useerrors |
| 21 | +stdout example.com/m/useunsafe |
| 22 | +[cgo] stdout example.com/m/useC |
| 23 | +[!cgo] ! stdout example.com/m/useC |
| 24 | +# stdout '^unicode$' |
| 25 | +# stdout '^unsafe$' |
| 26 | +# stdout index/suffixarray |
18 | 27 |
|
19 | 28 | # 'go list example.com/m/...' should list packages in all modules that begin with |
20 | 29 | # "example.com/m/". |
21 | 30 | go list example.com/m/... |
22 | | -cmp stdout prefix.txt |
| 31 | +stdout example.com/m/useunicode |
| 32 | +stdout example.com/m/useunsafe |
| 33 | +! stdout example.com/[^m] |
| 34 | +! stdout ^[^e] |
| 35 | +[cgo] stdout example.com/m/useC |
| 36 | +[!cgo] ! stdout example.com/m/useC |
23 | 37 |
|
24 | 38 | # 'go list ./...' should list only packages in the current module, not other active modules. |
25 | 39 | go list ./... |
26 | | -cmp stdout in-mod.txt |
27 | | - |
| 40 | +stdout example.com/m/useunicode |
| 41 | +stdout example.com/m/useunsafe |
| 42 | +[cgo] stdout example.com/m/useC |
| 43 | +[!cgo] ! stdout example.com/m/useC |
28 | 44 |
|
29 | 45 | -- m/go.mod -- |
30 | 46 | module example.com/m |
@@ -56,25 +72,3 @@ module example.com/m/nested |
56 | 72 | -- nested/useencoding/useencoding.go -- |
57 | 73 | package useencoding |
58 | 74 | import _ "encoding" |
59 | | - |
60 | | --- m/all.txt -- |
61 | | -example.com/m/useC |
62 | | -example.com/m/useunicode |
63 | | -example.com/m/useunsafe |
64 | | -unicode |
65 | | -unsafe |
66 | | --- m/dots.txt -- |
67 | | -example.com/m/useC |
68 | | -example.com/m/useunicode |
69 | | -example.com/m/useunsafe |
70 | | -example.com/m/nested/useencoding |
71 | | -example.com/unused/useerrors |
72 | | --- m/prefix.txt -- |
73 | | -example.com/m/useC |
74 | | -example.com/m/useunicode |
75 | | -example.com/m/useunsafe |
76 | | -example.com/m/nested/useencoding |
77 | | --- m/in-mod.txt -- |
78 | | -example.com/m/useC |
79 | | -example.com/m/useunicode |
80 | | -example.com/m/useunsafe |
0 commit comments