From 59a4a7da43bb8f57bd7c8253413e8055d19a0b6d Mon Sep 17 00:00:00 2001 From: boukeversteegh Date: Sun, 24 May 2020 20:25:29 +0200 Subject: [PATCH] Test case for issue #58 --- .../inputs/import_child_package_from_package/child.proto | 7 +++++++ .../import_child_package_from_package.proto | 9 +++++++++ .../package_message.proto | 9 +++++++++ 3 files changed, 25 insertions(+) create mode 100644 betterproto/tests/inputs/import_child_package_from_package/child.proto create mode 100644 betterproto/tests/inputs/import_child_package_from_package/import_child_package_from_package.proto create mode 100644 betterproto/tests/inputs/import_child_package_from_package/package_message.proto diff --git a/betterproto/tests/inputs/import_child_package_from_package/child.proto b/betterproto/tests/inputs/import_child_package_from_package/child.proto new file mode 100644 index 0000000..0865fc8 --- /dev/null +++ b/betterproto/tests/inputs/import_child_package_from_package/child.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package package.childpackage; + +message ChildMessage { + +} diff --git a/betterproto/tests/inputs/import_child_package_from_package/import_child_package_from_package.proto b/betterproto/tests/inputs/import_child_package_from_package/import_child_package_from_package.proto new file mode 100644 index 0000000..0d09132 --- /dev/null +++ b/betterproto/tests/inputs/import_child_package_from_package/import_child_package_from_package.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +import "package_message.proto"; + +// Tests generated imports when a message in a package refers to a message in a nested child package. + +message Test { + package.PackageMessage message = 1; +} diff --git a/betterproto/tests/inputs/import_child_package_from_package/package_message.proto b/betterproto/tests/inputs/import_child_package_from_package/package_message.proto new file mode 100644 index 0000000..943282c --- /dev/null +++ b/betterproto/tests/inputs/import_child_package_from_package/package_message.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +import "child.proto"; + +package package; + +message PackageMessage { + package.childpackage.ChildMessage c = 1; +}