michael-o commented on a change in pull request #605:
URL: https://github.com/apache/maven/pull/605#discussion_r780668329



##########
File path: maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerTest.java
##########
@@ -38,13 +40,19 @@ public void setup()
     }
 
     @Test
-    public void spacedOptions()
+    public void spacedOptionsShort()
         throws Exception
     {
-        CommandLine cmdLine = cliManager.parse( "-X -Dx=1 -D y=2 test".split( 
" " ) );
+        CommandLine cmdLine = cliManager.parse( "-X -Dv -Dw=1 -D x=2 
test".split( " " ) );
+
         assertTrue( cmdLine.hasOption( CLIManager.VERBOSE ) );
-        assertThat( cmdLine.getOptionValues( CLIManager.SET_SYSTEM_PROPERTY 
)[0], is( "x=1" ) );
-        assertThat( cmdLine.getOptionValues( CLIManager.SET_SYSTEM_PROPERTY 
)[1], is( "y=2" ) );
-    }
 
+        String[] properties = cmdLine.getOptionValues( 
CLIManager.SET_SYSTEM_PROPERTY );
+        assertThat( properties[0], is( "v" ) );
+        assertThat( properties[1], is( "w" ) );
+        assertThat( properties[2], is( "1" ) );
+        assertThat( properties[3], is( "x" ) );
+        assertThat( properties[4], is( "2" ) );
+        assertThat( properties, not( hasItemInArray( "test" ) ) );

Review comment:
       Is this still correct to do since the array cannot really tell relation 
between key and property. It could also be `-Dv=w -D1 -Dx=2 test`. Maybe turn 
this into `Properties` as well?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to