diff --git a/tools/test/unittest/aa/aa_command_dump_test.cpp b/tools/test/unittest/aa/aa_command_dump_test.cpp index 7b5985933a..a31fdc9649 100644 --- a/tools/test/unittest/aa/aa_command_dump_test.cpp +++ b/tools/test/unittest/aa/aa_command_dump_test.cpp @@ -126,7 +126,7 @@ HWTEST_F(AaCommandDumpTest, Aa_Command_Dump_0300, Function | MediumTest | Level1 int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_DUMPSYS); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_DUMPSYS); } /** @@ -145,7 +145,7 @@ HWTEST_F(AaCommandDumpTest, Aa_Command_Dump_0400, Function | MediumTest | Level1 int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_DUMPSYS); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_DUMPSYS); } /** @@ -164,7 +164,7 @@ HWTEST_F(AaCommandDumpTest, Aa_Command_Dump_0500, Function | MediumTest | Level1 int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_DUMPSYS); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_DUMPSYS); } /** @@ -183,7 +183,7 @@ HWTEST_F(AaCommandDumpTest, Aa_Command_Dump_0600, Function | MediumTest | Level1 int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_DUMPSYS); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_DUMPSYS); } /** diff --git a/tools/test/unittest/aa/aa_command_dumpsys_test.cpp b/tools/test/unittest/aa/aa_command_dumpsys_test.cpp index 64f8117983..91b1d57d9a 100644 --- a/tools/test/unittest/aa/aa_command_dumpsys_test.cpp +++ b/tools/test/unittest/aa/aa_command_dumpsys_test.cpp @@ -30,7 +30,7 @@ using namespace OHOS::AAFwk; namespace { const std::string STRING_USER_ID = "100"; -const std::string UNKNOWN_OPTION_MSG = "error: unknown option.\n"; +const std::string UNKNOWN_OPTION_MSG = "fail: unknown option.\n"; } // namespace class AaCommandDumpsysTest : public ::testing::Test { diff --git a/tools/test/unittest/aa/aa_command_screen_test.cpp b/tools/test/unittest/aa/aa_command_screen_test.cpp index 49d676b07c..1411e37d0f 100644 --- a/tools/test/unittest/aa/aa_command_screen_test.cpp +++ b/tools/test/unittest/aa/aa_command_screen_test.cpp @@ -121,7 +121,7 @@ HWTEST_F(AaCommandScreenTest, Aa_Command_Screen_0300, Function | MediumTest | Le int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_SCREEN); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_SCREEN); } /** @@ -140,7 +140,7 @@ HWTEST_F(AaCommandScreenTest, Aa_Command_Screen_0400, Function | MediumTest | Le int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_SCREEN); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_SCREEN); } /** @@ -159,7 +159,7 @@ HWTEST_F(AaCommandScreenTest, Aa_Command_Screen_0500, Function | MediumTest | Le int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_SCREEN); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_SCREEN); } /** @@ -178,7 +178,7 @@ HWTEST_F(AaCommandScreenTest, Aa_Command_Screen_0600, Function | MediumTest | Le int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_SCREEN); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_SCREEN); } /** @@ -197,7 +197,7 @@ HWTEST_F(AaCommandScreenTest, Aa_Command_Screen_0700, Function | MediumTest | Le int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_SCREEN); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_SCREEN); } /** diff --git a/tools/test/unittest/aa/aa_command_stop_service_test.cpp b/tools/test/unittest/aa/aa_command_stop_service_test.cpp index e5650e9121..baa72c478d 100644 --- a/tools/test/unittest/aa/aa_command_stop_service_test.cpp +++ b/tools/test/unittest/aa/aa_command_stop_service_test.cpp @@ -135,7 +135,7 @@ HWTEST_F(AaCommandStopServiceTest, Aa_Command_StopService_0300, Function | Mediu int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_STOP_SERVICE); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_STOP_SERVICE); } /** @@ -154,7 +154,7 @@ HWTEST_F(AaCommandStopServiceTest, Aa_Command_StopService_0400, Function | Mediu int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_STOP_SERVICE); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_STOP_SERVICE); } /** @@ -173,7 +173,7 @@ HWTEST_F(AaCommandStopServiceTest, Aa_Command_StopService_0500, Function | Mediu int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_STOP_SERVICE); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_STOP_SERVICE); } /** @@ -192,7 +192,7 @@ HWTEST_F(AaCommandStopServiceTest, Aa_Command_StopService_0600, Function | Mediu int argc = sizeof(argv) / sizeof(argv[0]) - 1; AbilityManagerShellCommand cmd(argc, argv); - EXPECT_EQ(cmd.ExecCommand(), "error: unknown option.\n" + HELP_MSG_STOP_SERVICE); + EXPECT_EQ(cmd.ExecCommand(), "fail: unknown option.\n" + HELP_MSG_STOP_SERVICE); } /**