| 1 |
This test checks that unimported completion is case-insensitive. |
| 2 |
|
| 3 |
-- go.mod -- |
| 4 |
module mod.test |
| 5 |
|
| 6 |
go 1.18 |
| 7 |
|
| 8 |
-- main.go -- |
| 9 |
package main |
| 10 |
|
| 11 |
//@item(Print, "Print", "func (from \"fmt\")", "func") |
| 12 |
//@item(Printf, "Printf", "func (from \"fmt\")", "func") |
| 13 |
//@item(Println, "Println", "func (from \"fmt\")", "func") |
| 14 |
|
| 15 |
func main() { |
| 16 |
fmt.p //@complete(re"fmt.p()", Print, Printf, Println), diag("fmt", re"(undefined|undeclared)") |
| 17 |
} |
| 18 |
|
| 19 |
-- other.go -- |
| 20 |
package main |
| 21 |
|
| 22 |
// Including another package that imports "fmt" causes completion to use the |
| 23 |
// existing metadata, which is the codepath leading to golang/go#60545. |
| 24 |
import "fmt" |
| 25 |
|
| 26 |
func _() { |
| 27 |
fmt.Println() |
| 28 |
} |