diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 15:08:21 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-01 15:08:21 -0700 |
commit | b4cc26f831573d8dc122b4d2ba8a5f5d8d7e3773 (patch) | |
tree | 50f9b76f472908663529a1ba38b01fd51193a191 /test | |
parent | 9f9ee6af4299dbc95f5d7b814679714ba0ab5051 (diff) |
Fix second bug in scheme delimiter searching
Path may also have colon, so make sure we don't scan
into the path element if there is one.
Diffstat (limited to 'test')
-rw-r--r-- | test/src/UriTests.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/src/UriTests.cpp b/test/src/UriTests.cpp index d7ada25..4c1f307 100644 --- a/test/src/UriTests.cpp +++ b/test/src/UriTests.cpp @@ -349,13 +349,14 @@ TEST(UriTests, ParseFromStringHostBarelyLegal) { } } -TEST(UriTests, ParseFromStringDontMisinterpretColonInAuthorityAsSchemeDelimiter) { +TEST(UriTests, ParseFromStringDontMisinterpretColonInOtherPlacesAsSchemeDelimiter) { const std::vector< std::string > testVectors{ {"//foo:bar@www.example.com/"}, {"//www.example.com/a:b"}, {"//www.example.com/foo?a:b"}, {"//www.example.com/foo#a:b"}, {"//[v7.:]/"}, + {"/:/foo"}, }; size_t index = 0; for (const auto& testVector : testVectors) { |