diff options
author | Feng Xiao <xiaofeng@google.com> | 2016-06-08 14:43:45 -0700 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2016-06-08 14:43:45 -0700 |
commit | fba7976f5d6f1be69d4219a7c485c93b8b28bf65 (patch) | |
tree | 3bec3f3a094e55d20070e6dd6a1450346c311418 /src/google/protobuf/compiler/command_line_interface_unittest.cc | |
parent | 401e07d3726e91659228dff8ed9f7cb02026c47e (diff) | |
parent | 462e7fab9831c026acbb38778f4506fcfdb2d945 (diff) |
Merge pull request #879 from mathstuf/support-equals-in-proto-path
protoc: support '=' in --proto_path arguments
Diffstat (limited to 'src/google/protobuf/compiler/command_line_interface_unittest.cc')
-rw-r--r-- | src/google/protobuf/compiler/command_line_interface_unittest.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc index 9b504d25..0ebf9b6a 100644 --- a/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc @@ -786,6 +786,21 @@ TEST_F(CommandLineInterfaceTest, NonRootMapping) { ExpectGenerated("test_generator", "", "bar/foo.proto", "Foo"); } +TEST_F(CommandLineInterfaceTest, PathWithEqualsSign) { + // Test setting up a search path which happens to have '=' in it. + + CreateTempDir("with=sign"); + CreateTempFile("with=sign/foo.proto", + "syntax = \"proto2\";\n" + "message Foo {}\n"); + + Run("protocol_compiler --test_out=$tmpdir " + "--proto_path=$tmpdir/with=sign foo.proto"); + + ExpectNoErrors(); + ExpectGenerated("test_generator", "", "foo.proto", "Foo"); +} + TEST_F(CommandLineInterfaceTest, MultipleGenerators) { // Test that we can have multiple generators and use both in one invocation, // each with a different output directory. |