Skip to content

Commit 6f0cc85

Browse files
committed
Add rawArgs_arePassedAsIsSingle test
1 parent 8cfe89f commit 6f0cc85

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

src/test/java/fr/ariouz/gkit/test/build/image/arg/NativeBuildArgTest.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)