Add test cases for cousin imports that break due to aliases starting with two underscores
This commit is contained in:
parent
c00e2aef19
commit
7c8d47de6d
@ -16,6 +16,9 @@ tests = {
|
|||||||
packages = {
|
packages = {
|
||||||
"import_root_package_from_child": ".child",
|
"import_root_package_from_child": ".child",
|
||||||
"import_parent_package_from_child": ".parent.child",
|
"import_parent_package_from_child": ".parent.child",
|
||||||
|
"import_root_package_from_nested_child": ".nested.child",
|
||||||
|
"import_cousin_package": ".test.subpackage",
|
||||||
|
"import_cousin_package_same_name": ".test.subpackage",
|
||||||
"repeatedmessage": ".repeatedmessage",
|
"repeatedmessage": ".repeatedmessage",
|
||||||
"service": ".service",
|
"service": ".service",
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cousin.cousin_subpackage;
|
||||||
|
|
||||||
|
message CousinMessage {
|
||||||
|
}
|
11
betterproto/tests/inputs/import_cousin_package/test.proto
Normal file
11
betterproto/tests/inputs/import_cousin_package/test.proto
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package test.subpackage;
|
||||||
|
|
||||||
|
import "cousin.proto";
|
||||||
|
|
||||||
|
// Verify that we can import message unrelated to us
|
||||||
|
|
||||||
|
message Test {
|
||||||
|
cousin.cousin_subpackage.CousinMessage message = 1;
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package cousin.subpackage;
|
||||||
|
|
||||||
|
message CousinMessage {
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package test.subpackage;
|
||||||
|
|
||||||
|
import "cousin.proto";
|
||||||
|
|
||||||
|
// Verify that we can import a message unrelated to us, in a subpackage with the same name as us.
|
||||||
|
|
||||||
|
message Test {
|
||||||
|
cousin.subpackage.CousinMessage message = 1;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user