File tree Expand file tree Collapse file tree
src/test/java/fr/ariouz/gkit/test/build/image/arg Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,18 +178,31 @@ void compactKeyValue_acceptsInteger() {
178178 }
179179
180180 @ Test
181- void rawArgs_arePassedAsIs () {
181+ void rawArgs_arePassedAsIsSingle () {
182182 NativeConfig nativeConfig = new NativeConfig ();
183183 nativeConfig .setBuildArgs (List .of (
184- Map .of (NativeBuildArg .RAW_ARGS .getConfigKey (), List .of ("--enable-preview" , "- Ob" ))
184+ Map .of (NativeBuildArg .RAW_ARGS .getConfigKey (), List .of ("-Ob" ))
185185 ));
186186
187187 List <String > args = new NativeBuildArgParser ()
188188 .parseBuildArgs (nativeConfig );
189189
190- assertThat (args ).containsExactly ("--enable-preview" , "- Ob" );
190+ assertThat (args ).containsExactly ("-Ob" );
191191 }
192192
193+ @ Test
194+ void rawArgs_arePassedAsIsMultiple () {
195+ NativeConfig nativeConfig = new NativeConfig ();
196+ nativeConfig .setBuildArgs (List .of (
197+ Map .of (NativeBuildArg .RAW_ARGS .getConfigKey (), List .of ("--enable-preview" , "-Ob" ))
198+ ));
199+
200+ List <String > args = new NativeBuildArgParser ()
201+ .parseBuildArgs (nativeConfig );
202+
203+ assertThat (args ).containsExactly ("--enable-preview" , "-Ob" );
204+ }
205+
193206 @ Test
194207 void rawArgs_emptyArgs () {
195208 NativeConfig nativeConfig = new NativeConfig ();
You can’t perform that action at this time.
0 commit comments