@@ -7529,19 +7529,17 @@ TEST_F(ProjMgrUnitTests, DuplicateComponents) {
75297529 argv[4 ] = (char *)" -o" ;
75307530 argv[5 ] = (char *)testoutput_folder.c_str ();
75317531 argv[6 ] = (char *)" --context" ;
7532+ argv[7 ] = (char *)" duplicateComponents_cproject" ;
75327533 argv[8 ] = (char *)" --no-check-schema" ;
7533-
7534- const char * contexts[] = { " duplicateComponents_cproject" , " duplicateComponents_clayer" };
7535- int argCounts[] = { 8 , 9 }; // without/with --no-check-schema
7536- for (int argCount : argCounts) {
7537- for (const char * context : contexts) {
7538- argv[7 ] = (char *)context;
7539- EXPECT_EQ (1 , RunProjMgr (argCount, argv, m_envp));
7540- auto errStr = streamRedirect.GetErrorString ();
7541- EXPECT_NE (string::npos, errStr.find (" error csolution: conflict: component 'RteTest:CORE' is listed multiple times" ));
7542- streamRedirect.ClearStringStreams ();
7543- }
7544- }
7534+ EXPECT_EQ (1 , RunProjMgr (9 , argv, m_envp));
7535+ auto errStr = streamRedirect.GetErrorString ();
7536+ EXPECT_NE (string::npos, errStr.find (" error csolution: conflict: component 'RteTest:CORE' is listed multiple times" ));
7537+
7538+ streamRedirect.ClearStringStreams ();
7539+ argv[7 ] = (char *)" duplicateComponents_clayer" ;
7540+ EXPECT_EQ (0 , RunProjMgr (9 , argv, m_envp));
7541+ errStr = streamRedirect.GetErrorString ();
7542+ EXPECT_NE (string::npos, errStr.find (" warning csolution: ignoring conflict: component 'RteTest:CORE' is listed multiple times" ));
75457543}
75467544
75477545TEST_F (ProjMgrUnitTests, ParseCommandLine_MutualExclusionOptions) {
0 commit comments