mirror of
https://github.com/golang/go
synced 2024-11-22 04:34:39 -07:00
cmd/go: add tests for loading invalid import path
This commit is contained in:
parent
0e49fb4d2b
commit
990c14cec8
14
src/cmd/go/testdata/script/load_invalid_import_path.txt
vendored
Normal file
14
src/cmd/go/testdata/script/load_invalid_import_path.txt
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# Tests issue 49137. The following commands should not panic any way.
|
||||
|
||||
! go list '"a"'
|
||||
stderr 'malformed import path "\\"a\\"": invalid char ''"'''
|
||||
|
||||
! go build '' -ldflags='-X "main.Tags="'
|
||||
stderr 'malformed import path "-ldflags=-X \\"main.Tags=\\"": leading dash'
|
||||
|
||||
-- go.mod --
|
||||
module m
|
||||
|
||||
go 1.16
|
||||
-- main.go --
|
||||
package main
|
Loading…
Reference in New Issue
Block a user