summaryrefslogtreecommitdiff
path: root/src/instrumentationTest/de/test/antennapod
diff options
context:
space:
mode:
authordaniel oeh <daniel.oeh@gmail.com>2014-07-07 21:01:37 +0200
committerdaniel oeh <daniel.oeh@gmail.com>2014-07-07 21:01:37 +0200
commit74294bad557e7079dac30b45853cba1271046d6f (patch)
treeb2352746711a3b1237778b6c0c7ea5ecd6a804ee /src/instrumentationTest/de/test/antennapod
parentf59623bb94bd338ddf59e39373f5ab50f9118216 (diff)
downloadAntennaPod-74294bad557e7079dac30b45853cba1271046d6f.zip
Remove leading and trailing whitespace in URLChecker. fixes #461
Diffstat (limited to 'src/instrumentationTest/de/test/antennapod')
-rw-r--r--src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java b/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
index 18e8bf007..91e5d966f 100644
--- a/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
+++ b/src/instrumentationTest/de/test/antennapod/util/URLCheckerTest.java
@@ -43,4 +43,16 @@ public class URLCheckerTest extends AndroidTestCase {
final String out = URLChecker.prepareURL(in);
assertEquals("http://example.com", out);
}
+
+ public void testWhiteSpaceUrlShouldNotAppend() {
+ final String in = "\n http://example.com \t";
+ final String out = URLChecker.prepareURL(in);
+ assertEquals("http://example.com", out);
+ }
+
+ public void testWhiteSpaceShouldAppend() {
+ final String in = "\n example.com \t";
+ final String out = URLChecker.prepareURL(in);
+ assertEquals("http://example.com", out);
+ }
}