Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
1d9591af
Commit
1d9591af
authored
15 years ago
by
Lynx Linden
Browse files
Options
Downloads
Patches
Plain Diff
DEV-44732: Added some unit tests for URLs with no protocols.
parent
07aa9421
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llui/tests/llurlentry_test.cpp
+46
-0
46 additions, 0 deletions
indra/llui/tests/llurlentry_test.cpp
with
46 additions
and
0 deletions
indra/llui/tests/llurlentry_test.cpp
+
46
−
0
View file @
1d9591af
...
@@ -545,4 +545,50 @@ namespace tut
...
@@ -545,4 +545,50 @@ namespace tut
"XXX [secondlife:///app/teleport/Ahern/50/50/50/ Teleport to Ahern] YYY"
,
"XXX [secondlife:///app/teleport/Ahern/50/50/50/ Teleport to Ahern] YYY"
,
"[secondlife:///app/teleport/Ahern/50/50/50/ Teleport to Ahern]"
);
"[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"
,
""
);
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment