summaryrefslogtreecommitdiff
path: root/indra/llui/tests/llurlentry_test.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-02-01 22:12:13 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-02-01 22:28:15 +0200
commit609a26b59a82bb8dfa5722b5f8ea6c42014360d2 (patch)
tree6a362b94a06ced7a8b063d7e5c86ce751800c2b3 /indra/llui/tests/llurlentry_test.cpp
parenteac0f1857c6e8e89be649b60dcd8dca7573933df (diff)
parent21565a1f3fe1ae737e2f91c58be2c3cb0b5a2fec (diff)
Merge branch 'master' of https://bitbucket.org/lindenlab/viewer/src/master into DRTVWR-515-maint
# Conflicts: # autobuild.xml (llca) # indra/llwindow/llwindow.h (SL-13507 vs SL-5894) # indra/newview/llscenemonitor.cpp (SL-14422) # indra/newview/llvovolume.cpp (SL-12069)
Diffstat (limited to 'indra/llui/tests/llurlentry_test.cpp')
-rw-r--r--indra/llui/tests/llurlentry_test.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp
index 3c34fd269e..4a4fdb72e3 100644
--- a/indra/llui/tests/llurlentry_test.cpp
+++ b/indra/llui/tests/llurlentry_test.cpp
@@ -903,4 +903,38 @@ namespace tut
"and even no www something lindenlab.com",
"");
}
+
+ template<> template<>
+ void object::test<16>()
+ {
+ //
+ // test LLUrlEntryIPv6
+ //
+ LLUrlEntryIPv6 url;
+
+ // Regex tests.
+ testRegex("match urls with a protocol", url,
+ "this url should match http://[::1]",
+ "http://[::1]");
+
+ testRegex("match urls with a protocol and query", url,
+ "this url should match http://[::1]/file.mp3",
+ "http://[::1]/file.mp3");
+
+ testRegex("match urls with a protocol", url,
+ "this url should match http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]",
+ "http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]");
+
+ testRegex("match urls with port", url,
+ "let's specify some port http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]:8080",
+ "http://[2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d]:8080");
+
+ testRegex("don't match urls w/o protocol", url,
+ "looks like an url something [2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d] but no https prefix",
+ "");
+
+ testRegex("don't match incorrect urls", url,
+ "http://[ 2001:0db8:11a3:09d7:1f34:8a2e:07a0:765d ]",
+ "");
+ }
}