Skip to content

Commit

Permalink
test: Add non-regression C++ test
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
  • Loading branch information
jjerphan committed Oct 2, 2024
1 parent af428e2 commit 7f59624
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
44 changes: 44 additions & 0 deletions libmamba/tests/data/history/parse_metadata/conda-meta/history
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
==> 2024-10-02 12:29:11 <==
# cmd: micromamba create -n repro2 pandas[version=">=0.25.2,<3"]
# conda version: 3.8.0
+conda-forge::_libgcc_mutex-0.1-conda_forge
+conda-forge::python_abi-3.12-5_cp312
+conda-forge::ca-certificates-2024.8.30-hbcca054_0
+conda-forge::ld_impl_linux-64-2.43-h712a8e2_1
+conda-forge::libgomp-14.1.0-h77fa898_1
+conda-forge::_openmp_mutex-4.5-2_gnu
+conda-forge::libgcc-14.1.0-h77fa898_1
+conda-forge::libgfortran5-14.1.0-hc5f4f2c_1
+conda-forge::libgcc-ng-14.1.0-h69a702a_1
+conda-forge::openssl-3.3.2-hb9d3cd8_0
+conda-forge::libexpat-2.6.3-h5888daf_0
+conda-forge::libstdcxx-14.1.0-hc0a3c3a_1
+conda-forge::libgfortran-14.1.0-h69a702a_1
+conda-forge::libffi-3.4.2-h7f98852_5
+conda-forge::libxcrypt-4.4.36-hd590300_1
+conda-forge::bzip2-1.0.8-h4bc722e_7
+conda-forge::ncurses-6.5-he02047a_1
+conda-forge::libzlib-1.3.1-h4ab18f5_1
+conda-forge::xz-5.2.6-h166bdaf_0
+conda-forge::libuuid-2.38.1-h0b41bf4_0
+conda-forge::libnsl-2.0.1-hd590300_0
+conda-forge::libgfortran-ng-14.1.0-h69a702a_1
+conda-forge::readline-8.2-h8228510_1
+conda-forge::tk-8.6.13-noxft_h4845f30_101
+conda-forge::libsqlite-3.46.1-hadc24fc_0
+conda-forge::libopenblas-0.3.27-pthreads_hac2b453_1
+conda-forge::libblas-3.9.0-24_linux64_openblas
+conda-forge::libcblas-3.9.0-24_linux64_openblas
+conda-forge::liblapack-3.9.0-24_linux64_openblas
+conda-forge::tzdata-2024a-h8827d51_1
+conda-forge::python-3.12.6-hc5c86c4_2_cpython
+conda-forge::wheel-0.44.0-pyhd8ed1ab_0
+conda-forge::setuptools-75.1.0-pyhd8ed1ab_0
+conda-forge::pip-24.2-pyh8b19718_1
+conda-forge::six-1.16.0-pyh6c4a22f_0
+conda-forge::pytz-2024.1-pyhd8ed1ab_0
+conda-forge::python-tzdata-2024.2-pyhd8ed1ab_0
+conda-forge::python-dateutil-2.9.0-pyhd8ed1ab_0
+conda-forge::numpy-2.1.1-py312h58c1407_0
+conda-forge::pandas-2.2.3-py312hf9745cd_1
# update specs: ["pandas[version=\">=0.25.2,<3\"]"]
12 changes: 12 additions & 0 deletions libmamba/tests/src/core/test_history.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ namespace mamba
REQUIRE_EQ(updated_history_buffer.str(), check_buffer.str());
}

TEST_CASE("parse_metadata")
{
auto channel_context = ChannelContext::make_conda_compatible(mambatests::context());

History history_instance(
mambatests::test_data_dir / "history/parse_metadata",
channel_context
);
// Must not throw
std::vector<History::UserRequest> user_reqs = history_instance.get_user_requests();
}

#ifndef _WIN32
TEST_CASE("parse_segfault")
{
Expand Down

0 comments on commit 7f59624

Please sign in to comment.