diff options
author | Nathan Mascitelli <mascitelli.nathan@gmail.com> | 2019-03-02 12:12:26 -0500 |
---|---|---|
committer | Nathan Mascitelli <mascitelli.nathan@gmail.com> | 2019-03-02 12:12:26 -0500 |
commit | 7e3ccd97da53108b8c5cec06cc0ae42454cdf42e (patch) | |
tree | 981270ff00ace02cede0c3fffc2efe2fd2e80296 /app | |
parent | 6f69b4b1403f2ca4a7fd1125d145bf13252c3732 (diff) | |
download | AntennaPod-7e3ccd97da53108b8c5cec06cc0ae42454cdf42e.zip |
Fix regex
Diffstat (limited to 'app')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/util/playback/TimelineTest.java | 10 |
1 files changed, 8 insertions, 2 deletions
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, "<p> Some test text with a timecode <" + timeStr + "> here.</p>", Integer.MAX_VALUE); + StringBuilder shownotes = new StringBuilder("<p> Some test text with timecodes "); + for (String timeStr : timeStrs) { + shownotes.append(timeStr).append(" "); + } + shownotes.append("here.</p>"); + + 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]); |