Commit 57014ffa authored by liujisi@google.com's avatar liujisi@google.com

Use Subprocess::Win32ErrorMessage() in command_line_interface_unittest to make…

Use Subprocess::Win32ErrorMessage() in command_line_interface_unittest to make the it OS locale independent.
parent 5c20ca1f
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <google/protobuf/compiler/command_line_interface.h> #include <google/protobuf/compiler/command_line_interface.h>
#include <google/protobuf/compiler/code_generator.h> #include <google/protobuf/compiler/code_generator.h>
#include <google/protobuf/compiler/mock_code_generator.h> #include <google/protobuf/compiler/mock_code_generator.h>
#include <google/protobuf/compiler/subprocess.h>
#include <google/protobuf/io/printer.h> #include <google/protobuf/io/printer.h>
#include <google/protobuf/unittest.pb.h> #include <google/protobuf/unittest.pb.h>
#include <google/protobuf/testing/file.h> #include <google/protobuf/testing/file.h>
...@@ -1140,9 +1141,8 @@ TEST_F(CommandLineInterfaceTest, GeneratorPluginNotFound) { ...@@ -1140,9 +1141,8 @@ TEST_F(CommandLineInterfaceTest, GeneratorPluginNotFound) {
"--proto_path=$tmpdir error.proto"); "--proto_path=$tmpdir error.proto");
#ifdef _WIN32 #ifdef _WIN32
ExpectErrorSubstring( ExpectErrorSubstring("--badplug_out: prefix-gen-badplug: " +
"--badplug_out: prefix-gen-badplug: The system cannot find the file " Subprocess::Win32ErrorMessage(ERROR_FILE_NOT_FOUND));
"specified.");
#else #else
// Error written to stdout by child process after exec() fails. // Error written to stdout by child process after exec() fails.
ExpectErrorSubstring( ExpectErrorSubstring(
......
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