mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-14 18:15:44 +00:00
Additional test to verify that FFProbeHelper still throws FFMpegException when FFProbe exits with non-zero code and no cancellation was requested.
Ref.: #594
This commit is contained in:
parent
b863f5d19e
commit
e44611bd25
1 changed files with 11 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
using FFMpegCore.Test.Resources;
|
using FFMpegCore.Exceptions;
|
||||||
|
using FFMpegCore.Test.Resources;
|
||||||
|
|
||||||
namespace FFMpegCore.Test;
|
namespace FFMpegCore.Test;
|
||||||
|
|
||||||
|
|
@ -342,4 +343,13 @@ public class FFProbeTests
|
||||||
// Check that all exceptions are OperationCanceledException
|
// Check that all exceptions are OperationCanceledException
|
||||||
CollectionAssert.AllItemsAreInstancesOfType(exceptions, typeof(OperationCanceledException));
|
CollectionAssert.AllItemsAreInstancesOfType(exceptions, typeof(OperationCanceledException));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
[Timeout(10000, CooperativeCancellation = true)]
|
||||||
|
public async Task FFProbe_Should_Throw_FFMpegException_When_Exits_With_Non_Zero_Code()
|
||||||
|
{
|
||||||
|
var input = TestResources.SrtSubtitle; //non media file
|
||||||
|
await Assert.ThrowsAsync<FFMpegException>(async () => await FFProbe.AnalyseAsync(input,
|
||||||
|
cancellationToken: TestContext.CancellationToken, customArguments: "--some-invalid-argument"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue