net: parse interface names more loosely in FaceUri
Only ':', '/', and whitespace are illegal.
Change-Id: I2c017682d299a12885c96c9b212c503319ca4f08
Refs: #4474
diff --git a/tests/unit-tests/net/face-uri.t.cpp b/tests/unit-tests/net/face-uri.t.cpp
index 1f90f67..73549df 100644
--- a/tests/unit-tests/net/face-uri.t.cpp
+++ b/tests/unit-tests/net/face-uri.t.cpp
@@ -173,6 +173,17 @@
BOOST_CHECK(uri.parse("udp6://[fe80::1%1]:6363"));
BOOST_CHECK(uri.parse("udp6://[fe80::1%eth1]"));
+
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%eth#1]"));
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%eth.1,2]"));
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%a+b-c=0]"));
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%[foo]]"));
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%]]"));
+ BOOST_CHECK(uri.parse("udp6://[ff01::114%%]"));
+ BOOST_CHECK(!uri.parse("udp6://[ff01::114%]"));
+ BOOST_CHECK(!uri.parse("udp6://[ff01::114%foo bar]"));
+ BOOST_CHECK(!uri.parse("udp6://[ff01::114%foo/bar]"));
+ BOOST_CHECK(!uri.parse("udp6://[ff01::114%eth0:1]"));
}
BOOST_FIXTURE_TEST_CASE(IsCanonicalUdp, CanonizeFixture)