Skip to content

Commit 2ce21da

Browse files
authored
fix: Don't check if the ffprobe executable path matches while testing (#338)
This allows using the FFPROBE environment variable when running tests locally
1 parent fa72c36 commit 2ce21da

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/java/net/bramp/ffmpeg/FFprobeTest.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,11 @@ public void testProbeDefaultArguments() throws IOException {
423423

424424
verify(runFunc, times(2)).run(argsCaptor.capture());
425425

426-
List<String> value = argsCaptor.getValue();
426+
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());
427427

428428
assertThat(
429429
value,
430-
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
430+
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
431431
);
432432
}
433433

@@ -437,11 +437,11 @@ public void testProbeProbeBuilder() throws IOException {
437437

438438
verify(runFunc, times(2)).run(argsCaptor.capture());
439439

440-
List<String> value = argsCaptor.getValue();
440+
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());
441441

442442
assertThat(
443443
value,
444-
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
444+
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
445445
);
446446
}
447447

@@ -451,11 +451,11 @@ public void testProbeProbeBuilderBuilt() throws IOException {
451451

452452
verify(runFunc, times(2)).run(argsCaptor.capture());
453453

454-
List<String> value = argsCaptor.getValue();
454+
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());
455455

456456
assertThat(
457457
value,
458-
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
458+
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
459459
);
460460
}
461461

@@ -465,11 +465,11 @@ public void testProbeProbeExtraArgs() throws IOException {
465465

466466
verify(runFunc, times(2)).run(argsCaptor.capture());
467467

468-
List<String> value = argsCaptor.getValue();
468+
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());
469469

470470
assertThat(
471471
value,
472-
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-rw_timeout", "0", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
472+
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-rw_timeout", "0", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
473473
);
474474
}
475475

@@ -479,11 +479,11 @@ public void testProbeProbeUserAgent() throws IOException {
479479

480480
verify(runFunc, times(2)).run(argsCaptor.capture());
481481

482-
List<String> value = argsCaptor.getValue();
482+
List<String> value = argsCaptor.getValue().subList(1, argsCaptor.getValue().size());
483483

484484
assertThat(
485485
value,
486-
is(ImmutableList.of("ffprobe", "-v", "quiet", "-print_format", "json", "-show_error", "-user_agent", "ffmpeg-cli-wrapper", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
486+
is(ImmutableList.of("-v", "quiet", "-print_format", "json", "-show_error", "-user_agent", "ffmpeg-cli-wrapper", "-show_format", "-show_streams", "-show_chapters", Samples.always_on_my_mind))
487487
);
488488
}
489489
}

0 commit comments

Comments
 (0)