mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 15:30:34 +05:30
Fix tests
Upstream changes are described here: https://github.com/jhy/jsoup/issues/1278 They are effectively irrelevant as YT removes the ``"``/attributes anyway.
This commit is contained in:
parent
7e21002838
commit
c4056f5d5c
@ -11,7 +11,7 @@ import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class YoutubeDescriptionHelperTest {
|
||||
class YoutubeDescriptionHelperTest {
|
||||
|
||||
private static void assertRunsToHtml(final String expectedHtml,
|
||||
final List<Run> openers,
|
||||
@ -32,9 +32,9 @@ public class YoutubeDescriptionHelperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoRuns() {
|
||||
void testNoRuns() {
|
||||
assertRunsToHtml(
|
||||
"abc *a* _c_ <br> <br> <a href=\"#\">test</a> &amp;",
|
||||
"abc *a* _c_ <br> <br> <a href="#">test</a> &amp;",
|
||||
List.of(),
|
||||
List.of(),
|
||||
"abc *a* _c_ <br>\u00a0\n\u00a0<a href=\"#\">test</a> &"
|
||||
@ -42,7 +42,7 @@ public class YoutubeDescriptionHelperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNormalRuns() {
|
||||
void testNormalRuns() {
|
||||
assertRunsToHtml(
|
||||
"<A>hel<B>lo </B>nic</A>e <C>test</C>",
|
||||
List.of(new Run("<A>", "</A>", 0), new Run("<B>", "</B>", 3),
|
||||
@ -54,7 +54,7 @@ public class YoutubeDescriptionHelperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOverlappingRuns() {
|
||||
void testOverlappingRuns() {
|
||||
assertRunsToHtml(
|
||||
"01<A>23<B>45</B></A><B>67</B>89",
|
||||
List.of(new Run("<A>", "</A>", 2), new Run("<B>", "</B>", 4)),
|
||||
@ -64,7 +64,7 @@ public class YoutubeDescriptionHelperTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransformingRuns() {
|
||||
void testTransformingRuns() {
|
||||
final Function<String, String> tA = content -> "whatever";
|
||||
final Function<String, String> tD
|
||||
= content -> Integer.parseInt(content) % 2 == 0 ? "even" : "odd";
|
||||
|
Loading…
x
Reference in New Issue
Block a user