Skip to content

Commit

Permalink
Adjust test to win32 exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Dec 5, 2024
1 parent 6e33793 commit 3c42ab8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/subprocess_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ TEST_F(SubprocessTest, BadCommandStderr) {

int exit = subproc->Finish();
EXPECT_NE(ExitSuccess, exit);
EXPECT_NE(ExitFailure, exit);
EXPECT_NE(ExitInterrupted, exit);
#ifdef _POSIX_VERSION
EXPECT_EQ(127, exit);
#endif
#ifdef _WIN32
EXPECT_EQ(ExitFailure, exit);
#endif
EXPECT_NE("", subproc->GetOutput());
}
Expand All @@ -73,10 +75,12 @@ TEST_F(SubprocessTest, NoSuchCommand) {

int exit = subproc->Finish();
EXPECT_NE(ExitSuccess, exit);
EXPECT_NE(ExitFailure, exit);
EXPECT_NE(ExitInterrupted, exit);
#ifdef _POSIX_VERSION
EXPECT_EQ(127, exit);
#endif
#ifdef _WIN32
EXPECT_EQ(ExitFailure, exit);
#endif
EXPECT_NE("", subproc->GetOutput());
#ifdef _WIN32
Expand Down

0 comments on commit 3c42ab8

Please sign in to comment.