Commit ef3730c2 authored by kenton@google.com's avatar kenton@google.com

Add test verifying that protoc accepts trailing backslashes on Windows, which…

Add test verifying that protoc accepts trailing backslashes on Windows, which some users claim doesn't work.  Seems to work on my machine.
parent d33e53ad
......@@ -539,6 +539,24 @@ TEST_F(CommandLineInterfaceTest, WindowsOutputPathAndParameter) {
EXPECT_EQ("bar", generator->parameter_);
}
TEST_F(CommandLineInterfaceTest, TrailingBackslash) {
// Test that the directories can end in backslashes. Some users claim this
// doesn't work on their system.
RegisterGenerator("test_generator", "--test_out",
"output.test", "Test output.");
CreateTempFile("foo.proto",
"syntax = \"proto2\";\n"
"message Foo {}\n");
Run("protocol_compiler --test_out=$tmpdir\\ "
"--proto_path=$tmpdir\\ foo.proto");
ExpectNoErrors();
ExpectGenerated("test_generator", "", "foo.proto", "Foo", "output.test");
}
#endif // defined(_WIN32) || defined(__CYGWIN__)
TEST_F(CommandLineInterfaceTest, PathLookup) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment