mirror of
https://github.com/bkaradzic/bx.git
synced 2026-10-08 09:55:38 +00:00
Added scanner. (#410)
This commit is contained in:
committed by
GitHub
parent
cd6720ce9a
commit
9916e720fc
@@ -41,6 +41,39 @@ static const UrlTest s_urlTest[] =
|
||||
, "file:///d:/tmp/archive.tar.gz",
|
||||
{ "file", "", "", "", "", "/d:/tmp/archive.tar.gz", "", "" },
|
||||
},
|
||||
|
||||
{ true
|
||||
, "scheme://host.rs/path#fragment",
|
||||
{ "scheme", "", "", "host.rs", "", "/path", "", "fragment" },
|
||||
},
|
||||
{ true
|
||||
, "scheme://host.rs/path?query#fragment",
|
||||
{ "scheme", "", "", "host.rs", "", "/path", "query", "fragment" },
|
||||
},
|
||||
{ true
|
||||
, "scheme://host.rs/path?",
|
||||
{ "scheme", "", "", "host.rs", "", "/path", "", "" },
|
||||
},
|
||||
{ true
|
||||
, "scheme://username:password@host.rs/",
|
||||
{ "scheme", "username", "password", "host.rs", "", "/", "", "" },
|
||||
},
|
||||
{ true
|
||||
, "scheme://host.rs",
|
||||
{ "scheme", "", "", "host.rs", "", "", "", "" },
|
||||
},
|
||||
{ false // Fragment must not precede query.
|
||||
, "scheme://host.rs/path#fragment?query",
|
||||
{ "", "", "", "", "", "", "", "" },
|
||||
},
|
||||
{ false // Neither scheme nor path.
|
||||
, "host.rs",
|
||||
{ "", "", "", "", "", "", "", "" },
|
||||
},
|
||||
{ false // Scheme must be alpha.
|
||||
, "1scheme://host.rs/",
|
||||
{ "", "", "", "", "", "", "", "" },
|
||||
},
|
||||
};
|
||||
|
||||
TEST_CASE("tokenizeUrl", "[url][string]")
|
||||
|
||||
Reference in New Issue
Block a user