Merge branch 'main' into pr/571

This commit is contained in:
Malte Rosenbjerg 2025-10-16 14:46:05 +02:00
commit ea8c493f8a
7 changed files with 32 additions and 37 deletions

View file

@ -682,4 +682,25 @@ public class ArgumentBuilderTest
// Act & Assert
Assert.ThrowsExactly<FileNotFoundException>(() => argument.Pre());
}
[TestMethod]
public void Concat_Escape()
{
var arg = new DemuxConcatArgument([@"Heaven's River\05 - Investigation.m4b"]);
CollectionAssert.AreEquivalent(new[] { @"file 'Heaven'\''s River\05 - Investigation.m4b'" }, arg.Values.ToArray());
}
[TestMethod]
public void Audible_Aaxc_Test()
{
var arg = new AudibleEncryptionKeyArgument("123", "456");
Assert.AreEqual("-audible_key 123 -audible_iv 456", arg.Text);
}
[TestMethod]
public void Audible_Aax_Test()
{
var arg = new AudibleEncryptionKeyArgument("62689101");
Assert.AreEqual("-activation_bytes 62689101", arg.Text);
}
}

View file

@ -1 +1 @@
[assembly: Parallelize]
[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]

View file

@ -1,6 +1,4 @@
using FFMpegCore.Arguments;
namespace FFMpegCore.Test;
namespace FFMpegCore.Test;
[TestClass]
public class FFMpegArgumentProcessorTest
@ -13,7 +11,7 @@ public class FFMpegArgumentProcessorTest
}
[TestMethod]
public void Processor_GlobalOptions_GetUsed()
public void ZZZ_Processor_GlobalOptions_GetUsed()
{
var globalWorkingDir = "Whatever";
var processor = CreateArgumentProcessor();
@ -45,7 +43,7 @@ public class FFMpegArgumentProcessorTest
}
[TestMethod]
public void Processor_Options_CanBeOverridden_And_Configured()
public void ZZZ_Processor_Options_CanBeOverridden_And_Configured()
{
var globalConfig = "Whatever";
@ -75,7 +73,7 @@ public class FFMpegArgumentProcessorTest
}
[TestMethod]
public void Options_Global_And_Session_Options_Can_Differ()
public void ZZZ_Options_Global_And_Session_Options_Can_Differ()
{
var globalWorkingDir = "Whatever";
@ -97,25 +95,4 @@ public class FFMpegArgumentProcessorTest
GlobalFFOptions.Configure(new FFOptions());
}
}
[TestMethod]
public void Concat_Escape()
{
var arg = new DemuxConcatArgument([@"Heaven's River\05 - Investigation.m4b"]);
CollectionAssert.AreEquivalent(new[] { @"file 'Heaven'\''s River\05 - Investigation.m4b'" }, arg.Values.ToArray());
}
[TestMethod]
public void Audible_Aaxc_Test()
{
var arg = new AudibleEncryptionKeyArgument("123", "456");
Assert.AreEqual("-audible_key 123 -audible_iv 456", arg.Text);
}
[TestMethod]
public void Audible_Aax_Test()
{
var arg = new AudibleEncryptionKeyArgument("62689101");
Assert.AreEqual("-activation_bytes 62689101", arg.Text);
}
}

View file

@ -5,6 +5,7 @@
<IsPackable>false</IsPackable>
<Nullable>disable</Nullable>
<LangVersion>default</LangVersion>
<OrderTestsByNameInClass>true</OrderTestsByNameInClass>
</PropertyGroup>
<ItemGroup>

View file

@ -27,20 +27,16 @@ public class FFMpegOptionsTest
}
[TestMethod]
public void Options_Set_Programmatically()
public void ZZZ_Options_Set_Programmatically()
{
var original = GlobalFFOptions.Current;
try
{
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = "Whatever" });
Assert.AreEqual(
"Whatever",
GlobalFFOptions.Current.BinaryFolder
);
Assert.AreEqual("Whatever", GlobalFFOptions.Current.BinaryFolder);
}
finally
{
GlobalFFOptions.Configure(original);
GlobalFFOptions.Configure(new FFOptions());
}
}
}

View file

@ -824,7 +824,6 @@ public class VideoTest
using var outputFile = new TemporaryFile("out.mp4");
var dataReceived = false;
GlobalFFOptions.Configure(opt => opt.Encoding = Encoding.UTF8);
var success = FFMpegArguments
.FromFileInput(TestResources.Mp4Video)
.WithGlobalOptions(options => options
@ -832,6 +831,7 @@ public class VideoTest
.OutputToFile(outputFile, false, opt => opt
.WithDuration(TimeSpan.FromSeconds(2)))
.NotifyOnError(_ => dataReceived = true)
.Configure(opt => opt.Encoding = Encoding.UTF8)
.ProcessSynchronously();
Assert.IsTrue(dataReceived);

View file

@ -1,3 +1,3 @@
{
"RootDirectory": ""
"BinaryFolder": ""
}