Skip to content

Commit c02797b

Browse files
committed
rustup-components-history: fixup tests to include version and git_commit_hash
1 parent e0e49a4 commit c02797b

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

library/src/availability.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,14 @@ mod tests {
139139
#[test]
140140
fn check() {
141141
let data = r#"date = "2018-09-03"
142+
[pkg.rust-src]
143+
version = "0.0.0"
144+
git_commit_hash = "0123456789abcdef"
142145
[pkg.rust-src.target."*"]
143146
available = true
147+
[pkg.ahaha]
148+
version = "0.0.0"
149+
git_commit_hash = "0123456789abcdef"
144150
[pkg.ahaha.target.lol]
145151
available = true
146152
"#;
@@ -179,6 +185,9 @@ available = true
179185
#[test]
180186
fn check_rename() {
181187
let data = r#"date = "2018-09-03"
188+
[pkg.ahaha]
189+
version = "0.0.0"
190+
git_commit_hash = "0123456789abcdef"
182191
[pkg.ahaha.target.lol]
183192
available = true
184193
[renames.kek]

library/src/manifest.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ mod tests {
8383
#[test]
8484
fn check() {
8585
let data = r#"date = "2018-09-03"
86+
[pkg.cargo]
87+
version = "0.89.0-nightly (7918c7eb5 2025-04-27)"
88+
git_commit_hash = "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d"
8689
[pkg.cargo.target.aarch64-unknown-linux-gnu]
8790
available = true
8891
@@ -92,6 +95,10 @@ available = true
9295
[pkg.cargo.target.arm-unknown-linux-gnueabihf]
9396
available = false
9497
98+
[pkg.rustfmt-preview]
99+
version = "1.8.0-nightly"
100+
git_commit_hash = "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d"
101+
95102
[pkg.rustfmt-preview.target.aarch64-unknown-linux-gnu]
96103
available = true
97104
@@ -114,6 +121,8 @@ to = "rustfmt-preview"
114121
(
115122
"cargo".to_string(),
116123
PackageTargets {
124+
version: "0.89.0-nightly (7918c7eb5 2025-04-27)".to_string(),
125+
git_commit_hash: "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d".to_string(),
117126
targets: vec![
118127
(
119128
"aarch64-unknown-linux-gnu".to_string(),
@@ -135,6 +144,8 @@ to = "rustfmt-preview"
135144
(
136145
"rustfmt-preview".to_string(),
137146
PackageTargets {
147+
version: "1.8.0-nightly".to_string(),
148+
git_commit_hash: "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d".to_string(),
138149
targets: vec![
139150
(
140151
"aarch64-unknown-linux-gnu".to_string(),
@@ -179,6 +190,9 @@ to = "rustfmt-preview"
179190
#[test]
180191
fn check_wildcard() {
181192
let data = r#"date = "2018-09-03"
193+
[pkg.rust-src]
194+
version = "1.88.0-nightly (e9f8103f9 2025-05-07)"
195+
git_commit_hash = "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d"
182196
[pkg.rust-src.target."*"]
183197
available = true
184198
url = "https://static.rust-lang.org/dist/2018-09-03/rust-src-nightly.tar.gz"
@@ -192,6 +206,8 @@ xz_hash = "dbb913da0a207ae80c53bc6a42074b637920c2a80121420416579fed3e7f2499"
192206
packages: vec![(
193207
"rust-src".to_string(),
194208
PackageTargets {
209+
version: "1.88.0-nightly (e9f8103f9 2025-05-07)".to_string(),
210+
git_commit_hash: "e9f8103f93f8ce2fa2c15c0c6796ec821f8ae15d".to_string(),
195211
targets: vec![("*".to_string(), PackageInfo { available: true })]
196212
.into_iter()
197213
.collect(),
@@ -210,6 +226,7 @@ xz_hash = "dbb913da0a207ae80c53bc6a42074b637920c2a80121420416579fed3e7f2499"
210226
date = "2018-09-03"
211227
[pkg.cargo]
212228
version = "0.30.0-nightly (0ec7281b9 2018-08-20)"
229+
git_commit_hash = "0ec7281b9c3f8e2fa2c15c0c6796ec821f8ae15d"
213230
[pkg.cargo.target.aarch64-unknown-linux-gnu]
214231
available = true
215232
url = "https://static.rust-lang.org/dist/2018-09-04/cargo-nightly-aarch64-unknown-linux-gnu.tar.gz"
@@ -233,6 +250,7 @@ xz_hash = "ca0e68e7e9827ba6221a40bb17170e8dc6271a9f6991ee5030dcf6acb1a1d8c8"
233250
234251
[pkg.rustfmt-preview]
235252
version = "0.99.2-nightly (5c9a2b6c1 2018-08-07)"
253+
git_commit_hash = "0ec7281b9c3f8e2fa2c15c0c6796ec821f8ae15d"
236254
[pkg.rustfmt-preview.target.aarch64-unknown-linux-gnu]
237255
available = true
238256
url = "https://static.rust-lang.org/dist/2018-09-03/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.gz"

0 commit comments

Comments
 (0)