diff --git a/tests/src/boxed_field.proto b/tests/src/boxed_field.proto new file mode 100644 index 000000000..17f543d92 --- /dev/null +++ b/tests/src/boxed_field.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package boxed_field; + +message Foo { + Bar bar = 1; +} + +message Bar { +} diff --git a/tests/src/build.rs b/tests/src/build.rs index 796157980..b707fb270 100644 --- a/tests/src/build.rs +++ b/tests/src/build.rs @@ -171,6 +171,11 @@ fn main() { .compile_protos(&[src.join("type_names.proto")], includes) .unwrap(); + prost_build::Config::new() + .boxed("Foo.bar") + .compile_protos(&[src.join("boxed_field.proto")], includes) + .unwrap(); + // Check that attempting to compile a .proto without a package declaration does not result in an error. config .compile_protos(&[src.join("no_package.proto")], includes) diff --git a/tests/src/lib.rs b/tests/src/lib.rs index bdeb90352..614baa969 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -140,6 +140,10 @@ pub mod invalid { } } +pub mod boxed_field { + include!(concat!(env!("OUT_DIR"), "/boxed_field.rs")); +} + pub mod default_string_escape { include!(concat!(env!("OUT_DIR"), "/default_string_escape.rs")); }