diff options
| author | Billy O'Neal <bion@microsoft.com> | 2021-02-04 10:15:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-04 10:15:44 -0800 |
| commit | aa60b7efa56a83ead743718941d8b320ef4a05af (patch) | |
| tree | db9f9ebd6fa37598b2f5f2ad564eb858cdeddcb0 /toolsrc/src/vcpkg-test/statusparagraphs.cpp | |
| parent | f226416d2eafc495dd03572cb61542fb1670ffdc (diff) | |
| download | vcpkg-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/statusparagraphs.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg-test/statusparagraphs.cpp | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/toolsrc/src/vcpkg-test/statusparagraphs.cpp b/toolsrc/src/vcpkg-test/statusparagraphs.cpp deleted file mode 100644 index f647484e6..000000000 --- a/toolsrc/src/vcpkg-test/statusparagraphs.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include <catch2/catch.hpp> - -#include <vcpkg/base/util.h> - -#include <vcpkg/paragraphs.h> -#include <vcpkg/statusparagraphs.h> - -#include <vcpkg-test/util.h> - -using namespace vcpkg; -using namespace vcpkg::Paragraphs; -using namespace vcpkg::Test; - -TEST_CASE ("find installed", "[statusparagraphs]") -{ - auto pghs = parse_paragraphs(R"( -Package: ffmpeg -Version: 3.3.3 -Architecture: x64-windows -Multi-Arch: same -Description: -Status: install ok installed -)", - ""); - - REQUIRE(pghs); - - StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - - auto it = status_db.find_installed({"ffmpeg", Test::X64_WINDOWS}); - REQUIRE(it != status_db.end()); -} - -TEST_CASE ("find not installed", "[statusparagraphs]") -{ - auto pghs = parse_paragraphs(R"( -Package: ffmpeg -Version: 3.3.3 -Architecture: x64-windows -Multi-Arch: same -Description: -Status: purge ok not-installed -)", - ""); - - REQUIRE(pghs); - - StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - - auto it = status_db.find_installed({"ffmpeg", Test::X64_WINDOWS}); - REQUIRE(it == status_db.end()); -} - -TEST_CASE ("find with feature packages", "[statusparagraphs]") -{ - auto pghs = parse_paragraphs(R"( -Package: ffmpeg -Version: 3.3.3 -Architecture: x64-windows -Multi-Arch: same -Description: -Status: install ok installed - -Package: ffmpeg -Feature: openssl -Depends: openssl -Architecture: x64-windows -Multi-Arch: same -Description: -Status: purge ok not-installed -)", - ""); - - REQUIRE(pghs); - - StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - - auto it = status_db.find_installed({"ffmpeg", Test::X64_WINDOWS}); - REQUIRE(it != status_db.end()); - - // Feature "openssl" is not installed and should not be found - auto it1 = status_db.find_installed({{"ffmpeg", Test::X64_WINDOWS}, "openssl"}); - REQUIRE(it1 == status_db.end()); -} - -TEST_CASE ("find for feature packages", "[statusparagraphs]") -{ - auto pghs = parse_paragraphs(R"( -Package: ffmpeg -Version: 3.3.3 -Architecture: x64-windows -Multi-Arch: same -Description: -Status: install ok installed - -Package: ffmpeg -Feature: openssl -Depends: openssl -Architecture: x64-windows -Multi-Arch: same -Description: -Status: install ok installed -)", - ""); - REQUIRE(pghs); - - StatusParagraphs status_db( - Util::fmap(*pghs.get(), [](Paragraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); })); - - // Feature "openssl" is installed and should therefore be found - auto it = status_db.find_installed({{"ffmpeg", Test::X64_WINDOWS}, "openssl"}); - REQUIRE(it != status_db.end()); -} |
