@@ -31,6 +31,7 @@ namespace
31
31
REQUIRE (pkg.filename == " pkg-6.4-bld.conda" );
32
32
REQUIRE (pkg.package_url == url);
33
33
REQUIRE (pkg.md5 == " " );
34
+ REQUIRE (pkg.sha256 == " " );
34
35
REQUIRE (pkg.platform == " linux-64" );
35
36
REQUIRE (pkg.channel == " https://conda.anaconda.org/conda-forge" );
36
37
}
@@ -48,6 +49,43 @@ namespace
48
49
REQUIRE (pkg.filename == " pkg-6.4-bld.conda" );
49
50
REQUIRE (pkg.package_url == url.substr (0 , url.rfind (' #' )));
50
51
REQUIRE (pkg.md5 == url.substr (url.rfind (' #' ) + 1 ));
52
+ REQUIRE (pkg.sha256 == " " );
53
+ REQUIRE (pkg.platform == " linux-64" );
54
+ REQUIRE (pkg.channel == " https://conda.anaconda.org/conda-forge" );
55
+ }
56
+
57
+ SECTION (" https://conda.anaconda.org/conda-forge/linux-64/pkg-6.4-bld.conda#7dbaa197d7ba6032caf7ae7f32c1efa07dbaa197d7ba6032caf7ae7f32c1efa0"
58
+ )
59
+ {
60
+ static constexpr std::string_view url = " https://conda.anaconda.org/conda-forge/linux-64/pkg-6.4-bld.conda#7dbaa197d7ba6032caf7ae7f32c1efa07dbaa197d7ba6032caf7ae7f32c1efa0" ;
61
+
62
+ auto pkg = PackageInfo::from_url (url).value ();
63
+
64
+ REQUIRE (pkg.name == " pkg" );
65
+ REQUIRE (pkg.version == " 6.4" );
66
+ REQUIRE (pkg.build_string == " bld" );
67
+ REQUIRE (pkg.filename == " pkg-6.4-bld.conda" );
68
+ REQUIRE (pkg.package_url == url.substr (0 , url.rfind (' #' )));
69
+ REQUIRE (pkg.md5 == " " );
70
+ REQUIRE (pkg.sha256 == url.substr (url.rfind (' #' ) + 1 ));
71
+ REQUIRE (pkg.platform == " linux-64" );
72
+ REQUIRE (pkg.channel == " https://conda.anaconda.org/conda-forge" );
73
+ }
74
+
75
+ SECTION (" https://conda.anaconda.org/conda-forge/linux-64/pkg-6.4-bld.conda#sha256:7dbaa197d7ba6032caf7ae7f32c1efa07dbaa197d7ba6032caf7ae7f32c1efa0"
76
+ )
77
+ {
78
+ static constexpr std::string_view url = " https://conda.anaconda.org/conda-forge/linux-64/pkg-6.4-bld.conda#sha256:7dbaa197d7ba6032caf7ae7f32c1efa07dbaa197d7ba6032caf7ae7f32c1efa0" ;
79
+
80
+ auto pkg = PackageInfo::from_url (url).value ();
81
+
82
+ REQUIRE (pkg.name == " pkg" );
83
+ REQUIRE (pkg.version == " 6.4" );
84
+ REQUIRE (pkg.build_string == " bld" );
85
+ REQUIRE (pkg.filename == " pkg-6.4-bld.conda" );
86
+ REQUIRE (pkg.package_url == url.substr (0 , url.rfind (' #' )));
87
+ REQUIRE (pkg.md5 == " " );
88
+ REQUIRE (pkg.sha256 == url.substr (url.rfind (" #sha256:" ) + 8 ));
51
89
REQUIRE (pkg.platform == " linux-64" );
52
90
REQUIRE (pkg.channel == " https://conda.anaconda.org/conda-forge" );
53
91
}
@@ -65,6 +103,7 @@ namespace
65
103
REQUIRE (pkg.filename == " _libgcc_mutex-0.1-conda_forge.tar.bz2" );
66
104
REQUIRE (pkg.package_url == url.substr (0 , url.rfind (' #' )));
67
105
REQUIRE (pkg.md5 == url.substr (url.rfind (' #' ) + 1 ));
106
+ REQUIRE (pkg.sha256 == " " );
68
107
REQUIRE (pkg.platform == " linux-64" );
69
108
// Make sure the token is not censored when setting the channel
70
109
REQUIRE (
0 commit comments