From 7e3ccd97da53108b8c5cec06cc0ae42454cdf42e Mon Sep 17 00:00:00 2001 From: Nathan Mascitelli Date: Sat, 2 Mar 2019 12:12:26 -0500 Subject: Fix regex --- .../java/de/test/antennapod/util/playback/TimelineTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/src/androidTest/java/de/test/antennapod/util/playback/TimelineTest.java b/app/src/androidTest/java/de/test/antennapod/util/playback/TimelineTest.java index c88c06a95..4bef14cd9 100644 --- a/app/src/androidTest/java/de/test/antennapod/util/playback/TimelineTest.java +++ b/app/src/androidTest/java/de/test/antennapod/util/playback/TimelineTest.java @@ -151,9 +151,15 @@ public class TimelineTest extends InstrumentationTestCase { } public void testProcessShownotesAndInvalidTimecode() throws Exception { - final String timeStr = "2:1"; + final String[] timeStrs = new String[] {"2:1", "0:0", "000", "00", "00:000"}; - Playable p = newTestPlayable(null, "

Some test text with a timecode <" + timeStr + "> here.

", Integer.MAX_VALUE); + StringBuilder shownotes = new StringBuilder("

Some test text with timecodes "); + for (String timeStr : timeStrs) { + shownotes.append(timeStr).append(" "); + } + shownotes.append("here.

"); + + Playable p = newTestPlayable(null, shownotes.toString(), Integer.MAX_VALUE); Timeline t = new Timeline(context, p); String res = t.processShownotes(true); checkLinkCorrect(res, new long[0], new String[0]); -- cgit v1.2.3