| 1 |
# Test that a directory with an .s file that has a comment that can't |
| 2 |
# be parsed isn't matched as a go directory. (This was happening because |
| 3 |
# non-go files with unparsable comments were being added to InvalidGoFiles |
| 4 |
# leading the package matching code to think there were Go files in the |
| 5 |
# directory.) |
| 6 |
|
| 7 |
cd bar |
| 8 |
go list ./... |
| 9 |
! stdout . |
| 10 |
cd .. |
| 11 |
|
| 12 |
[short] skip |
| 13 |
|
| 14 |
# Test that an unparsable .s file is completely ignored when its name |
| 15 |
# has build tags that cause it to be filtered out, but produces an error |
| 16 |
# when it is included |
| 17 |
|
| 18 |
env GOARCH=arm64 |
| 19 |
env GOOS=linux |
| 20 |
go build ./baz |
| 21 |
|
| 22 |
env GOARCH=amd64 |
| 23 |
env GOOS=linux |
| 24 |
! go build ./baz |
| 25 |
|
| 26 |
-- go.mod -- |
| 27 |
module example.com/foo |
| 28 |
|
| 29 |
go 1.20 |
| 30 |
-- bar/bar.s -- |
| 31 |
;/ |
| 32 |
-- baz/baz.go -- |
| 33 |
package bar |
| 34 |
-- baz/baz_amd64.s -- |
| 35 |
;/ |