diff options
| author | Runitai <> | 2010-01-11 11:24:04 -0600 |
|---|---|---|
| committer | Runitai <> | 2010-01-11 11:24:04 -0600 |
| commit | 78cb4204a471129a3f3486d33cf115de816de36c (patch) | |
| tree | bd2d8ea33a1c9d8b2893a1e8efc480d5bb87dc3a /indra/llui/tests | |
| parent | 2a00a16f57daf7c3f99b0374901c03644a5b5f1b (diff) | |
| parent | fddc7d856e420b24e67f1f20af7bc45817a1a8fb (diff) | |
Merge
Diffstat (limited to 'indra/llui/tests')
| -rw-r--r-- | indra/llui/tests/llurlentry_test.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/indra/llui/tests/llurlentry_test.cpp b/indra/llui/tests/llurlentry_test.cpp index 128cd134c1..38cf7124ce 100644 --- a/indra/llui/tests/llurlentry_test.cpp +++ b/indra/llui/tests/llurlentry_test.cpp @@ -545,4 +545,50 @@ namespace tut "XXX [secondlife:///app/teleport/Ahern/50/50/50/ Teleport to Ahern] YYY", "[secondlife:///app/teleport/Ahern/50/50/50/ Teleport to Ahern]"); } + + template<> template<> + void object::test<11>() + { + // + // test LLUrlEntryHTTPNoProtocol - general URLs without a protocol + // + LLUrlEntryHTTPNoProtocol url; + boost::regex r = url.getPattern(); + + testRegex("naked .com URL", r, + "see google.com", + "google.com"); + + testRegex("naked .org URL", r, + "see en.wikipedia.org for details", + "en.wikipedia.org"); + + testRegex("naked .net URL", r, + "example.net", + "example.net"); + + testRegex("naked .edu URL (2 instances)", r, + "MIT web site is at web.mit.edu and also www.mit.edu", + "web.mit.edu"); + + testRegex("invalid .com URL [1]", r, + "..com", + ""); + + testRegex("invalid .com URL [2]", r, + "you.come", + ""); + + testRegex("invalid .com URL [3]", r, + "recommended", + ""); + + testRegex("invalid .edu URL", r, + "hi there scheduled maitenance has begun", + ""); + + testRegex("invalid .net URL", r, + "foo.netty", + ""); + } } |
