tests.test_manager_vcpkg moduleΒΆ

vcpkg output tests.

These tests stub run_cli and replay the samples documented on VCPKG. They never call vcpkg.

tests.test_manager_vcpkg.LIST_OUTPUT = '{\n  "zlib:x64-linux": {\n    "package_name": "zlib",\n    "triplet": "x64-linux",\n    "version": "1.3.1",\n    "port_version": 0,\n    "features": [],\n    "desc": ["A compression library"]\n  }\n}'ΒΆ

vcpkg --classic list --x-json, as the docstring of installed shows it.

tests.test_manager_vcpkg.REVISED_LIST_OUTPUT = '{\n  "freexl:x64-linux": {\n    "package_name": "freexl",\n    "triplet": "x64-linux",\n    "version": "2.0.0",\n    "port_version": 2,\n    "features": [],\n    "desc": ["FreeXL is an open source library to extract valid data"]\n  }\n}'ΒΆ

The record of LIST_OUTPUT, for the freexl port of SEARCH_COLUMN_OUTPUT, whose 2.0.0#2 carries a port revision.

tests.test_manager_vcpkg.SEARCH_COLUMN_OUTPUT = 'cpr                      1.14.2           C++ Requests is a simple wrapper around libcurl\ncpr[ssl]                                  Enable SSL support\nduckdb[excel]                             Statically link the excel extension into DuckDB\nfreexl                   2.0.0#2          FreeXL is an open source library to extract valid data'ΒΆ

vcpkg --classic search excel, as the docstring of search() shows it.

tests.test_manager_vcpkg.SEARCH_LONG_NAMES_OUTPUT = 'azure-security-keyvault-administration-cpp 4.0.0-beta.5#3 Microsoft Azure Key Vault Administration SDK for C++\nazure-security-keyvault-certificates-cpp 4.2.1#5 Microsoft Azure Key Vault Certificates SDK for C++\nazure-security-keyvault-keys-cpp 4.4.1#5  Microsoft Azure Key Vault Keys SDK for C++\nazure-security-keyvault-secrets-cpp 4.2.1#5 Microsoft Azure Key Vault Secrets SDK for C++'ΒΆ

The rows of vcpkg --classic search keyvault for the ports of the 2026.07.29 registry, each name longer than the 24 columns vcpkg pads it to.

Laid out from the manifests by the rules of the do_print function of vcpkg, not captured from a vcpkg run.

tests.test_manager_vcpkg.test_installed_reads_the_json_listing(stub_run_cli, output, expected)[source]ΒΆ

The package is its full specification.

A non-zero port revision joins the version the way vcpkg renders it.

tests.test_manager_vcpkg.test_installed_skips_what_is_not_a_record(stub_run_cli, output)[source]ΒΆ

An answer with no record in it yields no package, and raises no error.

tests.test_manager_vcpkg.test_search_reads_the_column_listing(capture_run_cli, query, output, expected)[source]ΒΆ

A port gives its name and version, and the rows of its features are skipped.

A name longer than its column still ends at the space after it.

tests.test_manager_vcpkg.test_search_empty_answer(stub_run_cli)[source]ΒΆ

An empty answer is no match.