Adds ability to force-select specific audio and subtitle streams for the anime converter
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good
This commit is contained in:
@@ -6,15 +6,17 @@ import org.junit.Test;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class AnimeConverterTest {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
AnimeConverter converter = new AnimeConverter("ffprobe", "ffmpeg",
|
||||
new AnimeConverter("ffprobe", "ffmpeg",
|
||||
new String[]{"jpn", "eng", "nor", "swe"}, new String[]{"nor", "eng", "swe", "fin"}, false,
|
||||
false);
|
||||
false, -1, -1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void weirdTest() {
|
||||
assertEquals(0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package net.knarcraft.ffmpegconverter.utility;
|
||||
|
||||
import net.knarcraft.ffmpegconverter.parser.ConverterArgument;
|
||||
import net.knarcraft.ffmpegconverter.parser.ConverterArgumentValue;
|
||||
import net.knarcraft.ffmpegconverter.parser.ConverterArgumentValueType;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -18,9 +18,9 @@ public class ParserTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
validArguments = new ArrayList<>();
|
||||
validArguments.add(new ConverterArgument("anargument", 'a', true, ConverterArgumentValue.STRING));
|
||||
validArguments.add(new ConverterArgument("turnoff", 't', false, ConverterArgumentValue.BOOLEAN));
|
||||
validArguments.add(new ConverterArgument("turnon", 'o', false, ConverterArgumentValue.BOOLEAN));
|
||||
validArguments.add(new ConverterArgument("anargument", 'a', true, ConverterArgumentValueType.STRING));
|
||||
validArguments.add(new ConverterArgument("turnoff", 't', false, ConverterArgumentValueType.BOOLEAN));
|
||||
validArguments.add(new ConverterArgument("turnon", 'o', false, ConverterArgumentValueType.BOOLEAN));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -42,17 +42,17 @@ public class ParserTest {
|
||||
assertEquals("false", parsed.get("turnon"));
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseInvalidArgument() {
|
||||
Parser.parse("--someInvalidArgument hahaha", validArguments);
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseValueWhenExpectingArgument() {
|
||||
Parser.parse("somevalue", validArguments);
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void parseArgumentWithoutRequiredValue() {
|
||||
Parser.parse("--anargument -t", validArguments);
|
||||
}
|
||||
|
Reference in New Issue
Block a user