summaryrefslogtreecommitdiffstats
path: root/lldb/unittests/Utility/UriParserTest.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-08-20 23:09:34 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-08-20 23:09:34 +0000
commit549718563d09e1893139af80bb85f7fb18a294b9 (patch)
tree5abb8a2191777a747bf16017665f17a9c967a674 /lldb/unittests/Utility/UriParserTest.cpp
parent2df38cd0c4ac4f0661c259f5c3225b4358ada126 (diff)
downloadbcm5719-llvm-549718563d09e1893139af80bb85f7fb18a294b9.tar.gz
bcm5719-llvm-549718563d09e1893139af80bb85f7fb18a294b9.zip
Make UriParser to support [$HOSTNAME] notation.
http://reviews.llvm.org/D12025 llvm-svn: 245639
Diffstat (limited to 'lldb/unittests/Utility/UriParserTest.cpp')
-rw-r--r--lldb/unittests/Utility/UriParserTest.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/unittests/Utility/UriParserTest.cpp b/lldb/unittests/Utility/UriParserTest.cpp
index a11dd8e12b0..fe0a6a70f21 100644
--- a/lldb/unittests/Utility/UriParserTest.cpp
+++ b/lldb/unittests/Utility/UriParserTest.cpp
@@ -79,12 +79,36 @@ TEST_F (UriParserTest, MinimalPortPath)
VALIDATE
}
+TEST_F (UriParserTest, LongPath)
+{
+ const UriTestCase testCase("x://y/abc/def/xyz", "x", "y", -1, "/abc/def/xyz");
+ VALIDATE
+}
+
TEST_F (UriParserTest, TypicalPortPath)
{
const UriTestCase testCase("connect://192.168.100.132:5432/", "connect", "192.168.100.132", 5432, "/");
VALIDATE
}
+TEST_F (UriParserTest, BracketedHostnamePort)
+{
+ const UriTestCase testCase("connect://[192.168.100.132]:5432/", "connect", "192.168.100.132", 5432, "/");
+ VALIDATE
+}
+
+TEST_F (UriParserTest, BracketedHostname)
+{
+ const UriTestCase testCase("connect://[192.168.100.132]", "connect", "192.168.100.132", -1, "/");
+ VALIDATE
+}
+
+TEST_F (UriParserTest, BracketedHostnameWithColon)
+{
+ const UriTestCase testCase("connect://[192.168.100.132:5555]:1234", "connect", "192.168.100.132:5555", 1234, "/");
+ VALIDATE
+}
+
TEST_F (UriParserTest, SchemeHostSeparator)
{
const UriTestCase testCase("x:/y");
OpenPOWER on IntegriCloud