diff options
author | nalpp <nalpp@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 30d1ef3941e0dc835be7609de5ebee66958f215a (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/system/shellcommand_ut.cpp | |
parent | 87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (diff) | |
download | ydb-30d1ef3941e0dc835be7609de5ebee66958f215a.tar.gz |
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/shellcommand_ut.cpp')
-rw-r--r-- | util/system/shellcommand_ut.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/util/system/shellcommand_ut.cpp b/util/system/shellcommand_ut.cpp index db5545ea88..9d849279d2 100644 --- a/util/system/shellcommand_ut.cpp +++ b/util/system/shellcommand_ut.cpp @@ -79,7 +79,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { UNIT_ASSERT_VALUES_EQUAL(cmd.GetError(), ""); UNIT_ASSERT_VALUES_EQUAL(cmd.GetOutput(), "hello" NL); UNIT_ASSERT(TShellCommand::SHELL_FINISHED == cmd.GetStatus()); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); UNIT_ASSERT_VALUES_EQUAL(cmd.GetQuotedCommand(), "echo hello"); } @@ -108,7 +108,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { UNIT_ASSERT_VALUES_EQUAL(cmd.GetOutput(), "hello\n"); #endif UNIT_ASSERT(TShellCommand::SHELL_FINISHED == cmd.GetStatus()); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); } // running with no shell is not implemented for win // there should be no problem with it as long as SearchPath is on @@ -130,7 +130,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { cmd.Run(); UNIT_ASSERT(TShellCommand::SHELL_ERROR == cmd.GetStatus()); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 != cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 != cmd.GetExitCode()); } { options.SetUseShell(true); @@ -140,7 +140,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { cmd.Run(); UNIT_ASSERT(TShellCommand::SHELL_FINISHED == cmd.GetStatus()); UNIT_ASSERT_VALUES_EQUAL(cmd.GetError().size(), 0u); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); } } Y_UNIT_TEST(TestAsyncRun) { @@ -165,7 +165,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { #if !defined(_win_) UNIT_ASSERT(TShellCommand::SHELL_FINISHED == cmd.GetStatus()); UNIT_ASSERT_VALUES_EQUAL(cmd.GetOutput().size(), 0u); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); #endif } Y_UNIT_TEST(TestQuotes) { @@ -190,15 +190,15 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { cmd.Run().Wait(); UNIT_ASSERT(TShellCommand::SHELL_ERROR == cmd.GetStatus()); UNIT_ASSERT_VALUES_UNEQUAL(cmd.GetError().size(), 0u); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 != cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 != cmd.GetExitCode()); } Y_UNIT_TEST(TestExitCode) { - TShellCommand cmd("grep qwerty qwerty"); // some nonexistent file name - cmd.Run().Wait(); - UNIT_ASSERT(TShellCommand::SHELL_ERROR == cmd.GetStatus()); + TShellCommand cmd("grep qwerty qwerty"); // some nonexistent file name + cmd.Run().Wait(); + UNIT_ASSERT(TShellCommand::SHELL_ERROR == cmd.GetStatus()); UNIT_ASSERT_VALUES_UNEQUAL(cmd.GetError().size(), 0u); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 2 == cmd.GetExitCode()); - } + UNIT_ASSERT(cmd.GetExitCode().Defined() && 2 == cmd.GetExitCode()); + } // 'type con' and 'copy con con' want real console, not stdin, use sort Y_UNIT_TEST(TestInput) { TShellCommandOptions options; @@ -258,7 +258,7 @@ Y_UNIT_TEST_SUITE(TShellCommandTest) { UNIT_ASSERT_VALUES_EQUAL(cmd.GetError(), ""); UNIT_ASSERT(TShellCommand::SHELL_FINISHED == cmd.GetStatus()); UNIT_ASSERT_VALUES_EQUAL(read.Str(), "alpha" NL "omega" NL "zeta" NL); - UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); + UNIT_ASSERT(cmd.GetExitCode().Defined() && 0 == cmd.GetExitCode()); } Y_UNIT_TEST(TestStreamClose) { struct TStream: public IOutputStream { |