summaryrefslogtreecommitdiff
path: root/src/instrumentationTest/de/test/antennapod
diff options
context:
space:
mode:
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);
+ }
}