From c4a13384ce2ea953e8e131d49183bc28bba7bee8 Mon Sep 17 00:00:00 2001 From: Adrien Vannson Date: Fri, 8 Nov 2024 14:02:34 +0100 Subject: [PATCH] New tests --- tests/inputs/import_child_scoping_rules/child.proto | 7 +++++++ .../import_child_scoping_rules.proto | 9 +++++++++ .../inputs/import_child_scoping_rules/package.proto | 13 +++++++++++++ .../child.proto | 7 +++++++ .../import_nested_child_package_from_root.proto | 9 +++++++++ 5 files changed, 45 insertions(+) create mode 100644 tests/inputs/import_child_scoping_rules/child.proto create mode 100644 tests/inputs/import_child_scoping_rules/import_child_scoping_rules.proto create mode 100644 tests/inputs/import_child_scoping_rules/package.proto create mode 100644 tests/inputs/import_nested_child_package_from_root/child.proto create mode 100644 tests/inputs/import_nested_child_package_from_root/import_nested_child_package_from_root.proto diff --git a/tests/inputs/import_child_scoping_rules/child.proto b/tests/inputs/import_child_scoping_rules/child.proto new file mode 100644 index 00000000..f491e0da --- /dev/null +++ b/tests/inputs/import_child_scoping_rules/child.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package import_child_scoping_rules.aaa.bbb.ccc.ddd; + +message ChildMessage { + +} diff --git a/tests/inputs/import_child_scoping_rules/import_child_scoping_rules.proto b/tests/inputs/import_child_scoping_rules/import_child_scoping_rules.proto new file mode 100644 index 00000000..272852cc --- /dev/null +++ b/tests/inputs/import_child_scoping_rules/import_child_scoping_rules.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package import_child_scoping_rules; + +import "package.proto"; + +message Test { + aaa.bbb.Msg msg = 1; +} diff --git a/tests/inputs/import_child_scoping_rules/package.proto b/tests/inputs/import_child_scoping_rules/package.proto new file mode 100644 index 00000000..6b51fe56 --- /dev/null +++ b/tests/inputs/import_child_scoping_rules/package.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package import_child_scoping_rules.aaa.bbb; + +import "child.proto"; + +message Msg { + .import_child_scoping_rules.aaa.bbb.ccc.ddd.ChildMessage a = 1; + import_child_scoping_rules.aaa.bbb.ccc.ddd.ChildMessage b = 2; + aaa.bbb.ccc.ddd.ChildMessage c = 3; + bbb.ccc.ddd.ChildMessage d = 4; + ccc.ddd.ChildMessage e = 5; +} diff --git a/tests/inputs/import_nested_child_package_from_root/child.proto b/tests/inputs/import_nested_child_package_from_root/child.proto new file mode 100644 index 00000000..fcd7e2f6 --- /dev/null +++ b/tests/inputs/import_nested_child_package_from_root/child.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package import_nested_child_package_from_root.package.child.otherchild; + +message ChildMessage { + +} diff --git a/tests/inputs/import_nested_child_package_from_root/import_nested_child_package_from_root.proto b/tests/inputs/import_nested_child_package_from_root/import_nested_child_package_from_root.proto new file mode 100644 index 00000000..96da1ace --- /dev/null +++ b/tests/inputs/import_nested_child_package_from_root/import_nested_child_package_from_root.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package import_nested_child_package_from_root; + +import "child.proto"; + +message Test { + package.child.otherchild.ChildMessage child = 1; +}