aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg-test/downloads.cpp
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-02-04 10:15:44 -0800
committerGitHub <noreply@github.com>2021-02-04 10:15:44 -0800
commitaa60b7efa56a83ead743718941d8b320ef4a05af (patch)
treedb9f9ebd6fa37598b2f5f2ad564eb858cdeddcb0 /toolsrc/src/vcpkg-test/downloads.cpp
parentf226416d2eafc495dd03572cb61542fb1670ffdc (diff)
downloadvcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.tar.gz
vcpkg-aa60b7efa56a83ead743718941d8b320ef4a05af.zip
[vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (#15474)
This reduces bootstrap cost for Windows customers, resolving the issue initially submitted as #12502 . The `toolsrc` tree was extracted to https://github.com/microsoft/vcpkg-tool. `bootstrap.sh` was changed to download the right source tarball, extract, and build it. This was chosen over the previous attempt, a submodule, over concerns of accidentally destroying people's local modifications.
Diffstat (limited to 'toolsrc/src/vcpkg-test/downloads.cpp')
-rw-r--r--toolsrc/src/vcpkg-test/downloads.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/toolsrc/src/vcpkg-test/downloads.cpp b/toolsrc/src/vcpkg-test/downloads.cpp
deleted file mode 100644
index b182e46d6..000000000
--- a/toolsrc/src/vcpkg-test/downloads.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <catch2/catch.hpp>
-
-#include <vcpkg/base/downloads.h>
-
-using namespace vcpkg;
-
-TEST_CASE ("Downloads::details::split_uri_view", "[downloads]")
-{
- {
- auto x = Downloads::details::split_uri_view("https://github.com/Microsoft/vcpkg");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "https");
- REQUIRE(x.get()->authority.value_or("") == "//github.com");
- REQUIRE(x.get()->path_query_fragment == "/Microsoft/vcpkg");
- }
- {
- auto x = Downloads::details::split_uri_view("");
- REQUIRE(!x.has_value());
- }
- {
- auto x = Downloads::details::split_uri_view("hello");
- REQUIRE(!x.has_value());
- }
- {
- auto x = Downloads::details::split_uri_view("file:");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "file");
- REQUIRE(!x.get()->authority.has_value());
- REQUIRE(x.get()->path_query_fragment == "");
- }
- {
- auto x = Downloads::details::split_uri_view("file:path");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "file");
- REQUIRE(!x.get()->authority.has_value());
- REQUIRE(x.get()->path_query_fragment == "path");
- }
- {
- auto x = Downloads::details::split_uri_view("file:/path");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "file");
- REQUIRE(!x.get()->authority.has_value());
- REQUIRE(x.get()->path_query_fragment == "/path");
- }
- {
- auto x = Downloads::details::split_uri_view("file://user:pw@host");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "file");
- REQUIRE(x.get()->authority.value_or({}) == "//user:pw@host");
- REQUIRE(x.get()->path_query_fragment == "");
- }
- {
- auto x = Downloads::details::split_uri_view("ftp://host:port/");
- REQUIRE(x.has_value());
- REQUIRE(x.get()->scheme == "ftp");
- REQUIRE(x.get()->authority.value_or({}) == "//host:port");
- REQUIRE(x.get()->path_query_fragment == "/");
- }
-}