From b84dc703e82105d4fcbfb1501632cece1322fa37 Mon Sep 17 00:00:00 2001 From: Jason Yu Date: Sun, 20 Oct 2024 02:00:00 -0400 Subject: [PATCH] Added: Add empty and null strings tests for invalid urls to `FileReceiverActivityTest` --- .../java/com/termux/app/api/file/FileReceiverActivityTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/test/java/com/termux/app/api/file/FileReceiverActivityTest.java b/app/src/test/java/com/termux/app/api/file/FileReceiverActivityTest.java index 1107671daf..7965255b73 100644 --- a/app/src/test/java/com/termux/app/api/file/FileReceiverActivityTest.java +++ b/app/src/test/java/com/termux/app/api/file/FileReceiverActivityTest.java @@ -26,6 +26,8 @@ public void testIsSharedTextAnUrl() { List invalidUrls = new ArrayList<>(); invalidUrls.add("a test with example.com"); + invalidUrls.add(""); + invalidUrls.add(null); for (String url : invalidUrls) { Assert.assertFalse(FileReceiverActivity.isSharedTextAnUrl(url)); }