diff --git a/test/unittest/cpp_test/src/input_method_manager_command_test.cpp b/test/unittest/cpp_test/src/input_method_manager_command_test.cpp index 5aaa40f6970f76a0aa5b134f29db81c87a313720..2f7549c15a2ea870fc25851cd75c1997792df5c4 100644 --- a/test/unittest/cpp_test/src/input_method_manager_command_test.cpp +++ b/test/unittest/cpp_test/src/input_method_manager_command_test.cpp @@ -186,7 +186,8 @@ HWTEST_F(InputMethodManagerCommandTest, ExeCmd_009, TestSize.Level1) std::string result; auto ret = TddUtil::ExecuteCmd("ime -g", result); EXPECT_TRUE(ret); - EXPECT_EQ("The current input method is: com.example.newTestIme, status: FULL_EXPERIENCE_MODE\n", result); + std::string expectStr = "The current input method is: com.example.newTestIm"; + EXPECT_TRUE(result.find(expectStr) != std::string::npos); } /**