Skip to content

Commit

Permalink
Add test for specific exit code in posix
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Dec 3, 2024
1 parent cdbb821 commit 0f56f38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/subprocess_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ TEST_F(SubprocessTest, BadCommandStderr) {
EXPECT_NE(ExitSuccess, exit);
EXPECT_NE(ExitFailure, exit);
EXPECT_NE(ExitInterrupted, exit);
#ifdef _POSIX_VERSION
EXPECT_EQ(127, exit);
#endif
EXPECT_NE("", subproc->GetOutput());
}

Expand All @@ -72,6 +75,9 @@ TEST_F(SubprocessTest, NoSuchCommand) {
EXPECT_NE(ExitSuccess, exit);
EXPECT_NE(ExitFailure, exit);
EXPECT_NE(ExitInterrupted, exit);
#ifdef _POSIX_VERSION
EXPECT_EQ(127, exit);
#endif
EXPECT_NE("", subproc->GetOutput());
#ifdef _WIN32
ASSERT_EQ("CreateProcess failed: The system cannot find the file "
Expand Down

0 comments on commit 0f56f38

Please sign in to comment.