Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
abe61de6
Commit
abe61de6
authored
Aug 05, 2014
by
jieluo@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make changes to pass Cygwin
parent
91e32ac6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
configure.ac
configure.ac
+2
-1
command_line_interface_unittest.cc
...ogle/protobuf/compiler/command_line_interface_unittest.cc
+9
-5
No files found.
configure.ac
View file @
abe61de6
...
...
@@ -29,7 +29,7 @@ AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE
([subdir-objects])
AC_ARG_WITH([zlib],
[AS_HELP_STRING([--with-zlib],
...
...
@@ -46,6 +46,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_LANG([C++])
ACX_USE_SYSTEM_EXTENSIONS
AM_PROG_AR
AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
# test_util.cc takes forever to compile with GCC and optimization turned on.
...
...
src/google/protobuf/compiler/command_line_interface_unittest.cc
View file @
abe61de6
...
...
@@ -85,7 +85,7 @@ class CommandLineInterfaceTest : public testing::Test {
// Runs the CommandLineInterface with the given command line. The
// command is automatically split on spaces, and the string "$tmpdir"
// is replaced with TestTempDir().
void
Run
(
const
string
&
command
);
void
Run
(
const
string
&
command
,
bool
capture_stdout
=
false
);
// -----------------------------------------------------------------
// Methods to set up the test (called before Run()).
...
...
@@ -261,7 +261,7 @@ void CommandLineInterfaceTest::TearDown() {
mock_generators_to_delete_
.
clear
();
}
void
CommandLineInterfaceTest
::
Run
(
const
string
&
command
)
{
void
CommandLineInterfaceTest
::
Run
(
const
string
&
command
,
bool
capture_stdout
)
{
vector
<
string
>
args
=
Split
(
command
,
" "
,
true
);
if
(
!
disallow_plugins_
)
{
...
...
@@ -308,13 +308,17 @@ void CommandLineInterfaceTest::Run(const string& command) {
argv
[
i
]
=
args
[
i
].
c_str
();
}
CaptureTestStdout
();
if
(
capture_stdout
)
{
CaptureTestStdout
();
}
CaptureTestStderr
();
return_code_
=
cli_
.
Run
(
args
.
size
(),
argv
.
get
());
error_text_
=
GetCapturedTestStderr
();
captured_stdout_
=
GetCapturedTestStdout
();
if
(
capture_stdout
)
{
captured_stdout_
=
GetCapturedTestStdout
();
}
}
// -------------------------------------------------------------------
...
...
@@ -1461,7 +1465,7 @@ TEST_F(CommandLineInterfaceTest, PrintFreeFieldNumbers) {
"}
\n
"
);
Run
(
"protocol_compiler --print_free_field_numbers --proto_path=$tmpdir "
"foo.proto bar.proto baz.proto quz.proto"
);
"foo.proto bar.proto baz.proto quz.proto"
,
true
);
ExpectNoErrors
();
ExpectCapturedStdout
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment