Skip to content

Commit

Permalink
Add a test that exercises resolve_regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed May 25, 2023
1 parent 9161373 commit f86080d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions language/go/resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,46 @@ go_proto_library(
importpath = "test",
deps = ["//:good"],
)
`,
}, {
desc: "proto_override_regexp",
index: []buildFile{{
rel: "",
content: `
# gazelle:resolve_regexp proto go google/rpc/.*\.proto :good
proto_library(
name = "bad_proto",
srcs = ["google/rpc/status.proto"],
)
go_proto_library(
name = "bad_go_proto",
proto = ":bad_proto",
importpath = "bad",
)
`,
}},
old: buildFile{
rel: "test",
content: `
go_proto_library(
name = "dep_go_proto",
importpath = "test",
_imports = [
"google/rpc/status.proto",
"google/rpc/status1.proto",
"google/rpc/status2.proto",
],
)
`,
},
want: `
go_proto_library(
name = "dep_go_proto",
importpath = "test",
deps = ["//:good"],
)
`,
}, {
desc: "proto_index",
Expand Down

0 comments on commit f86080d

Please sign in to comment.